CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWBoxIconBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWBoxIconBase
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Thu Feb 19 15:09:45 CST 2009
11 // $Id: FWBoxIconBase.cc,v 1.1 2009/03/04 16:40:50 chrjones Exp $
12 //
13 
14 // system include files
15 #include "TVirtualX.h"
16 
17 // user include files
19 
20 
21 //
22 // constants, enums and typedefs
23 //
24 
25 //
26 // static data member definitions
27 //
28 
29 //
30 // constructors and destructor
31 //
32 FWBoxIconBase::FWBoxIconBase(unsigned int iEdgeLength):
33 m_edgeLength(iEdgeLength)
34 {
35 }
36 
37 // FWBoxIconBase::FWBoxIconBase(const FWBoxIconBase& rhs)
38 // {
39 // // do actual copying here;
40 // }
41 
43 {
44 }
45 
46 //
47 // assignment operators
48 //
49 // const FWBoxIconBase& FWBoxIconBase::operator=(const FWBoxIconBase& rhs)
50 // {
51 // //An exception safe implementation is
52 // FWBoxIconBase temp(rhs);
53 // swap(rhs);
54 //
55 // return *this;
56 // }
57 
58 //
59 // member functions
60 //
61 
62 //
63 // const member functions
64 //
65 void
66 FWBoxIconBase::draw(Drawable_t iID, GContext_t iContext, int iX, int iY) const
67 {
68  //draw in background color
69  gVirtualX->ClearArea(iID,iX,iY,m_edgeLength-1,m_edgeLength-1);
70  //now draw foreground
71  gVirtualX->DrawLine(iID, iContext, iX, iY, iX+m_edgeLength-1,iY);
72  gVirtualX->DrawLine(iID, iContext, iX+m_edgeLength-1, iY, iX+m_edgeLength-1,iY+m_edgeLength-1);
73  gVirtualX->DrawLine(iID, iContext, iX, iY+m_edgeLength-1, iX+m_edgeLength-1,iY+m_edgeLength-1);
74  gVirtualX->DrawLine(iID, iContext, iX, iY, iX,iY+m_edgeLength-1);
75 
76  drawInsideBox(iID,iContext, iX+1, iY+1, m_edgeLength-2);
77 }
78 
79 //
80 // static member functions
81 //
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:51
virtual void drawInsideBox(Drawable_t iID, GContext_t iContext, int iX, int iY, unsigned int iSize) const =0
virtual ~FWBoxIconBase()
FWBoxIconBase(unsigned int iEdgeLength)
void draw(Drawable_t iID, GContext_t iContext, int iX, int iY) const