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 //
12 
13 // system include files
14 #include "TVirtualX.h"
15 
16 // user include files
18 
19 
20 //
21 // constants, enums and typedefs
22 //
23 
24 //
25 // static data member definitions
26 //
27 
28 //
29 // constructors and destructor
30 //
31 FWBoxIconBase::FWBoxIconBase(unsigned int iEdgeLength):
32 m_edgeLength(iEdgeLength)
33 {
34 }
35 
36 // FWBoxIconBase::FWBoxIconBase(const FWBoxIconBase& rhs)
37 // {
38 // // do actual copying here;
39 // }
40 
42 {
43 }
44 
45 //
46 // assignment operators
47 //
48 // const FWBoxIconBase& FWBoxIconBase::operator=(const FWBoxIconBase& rhs)
49 // {
50 // //An exception safe implementation is
51 // FWBoxIconBase temp(rhs);
52 // swap(rhs);
53 //
54 // return *this;
55 // }
56 
57 //
58 // member functions
59 //
60 
61 //
62 // const member functions
63 //
64 void
65 FWBoxIconBase::draw(Drawable_t iID, GContext_t iContext, int iX, int iY) const
66 {
67  //draw in background color
68  gVirtualX->ClearArea(iID,iX,iY,m_edgeLength-1,m_edgeLength-1);
69  //now draw foreground
70  gVirtualX->DrawLine(iID, iContext, iX, iY, iX+m_edgeLength-1,iY);
71  gVirtualX->DrawLine(iID, iContext, iX+m_edgeLength-1, iY, iX+m_edgeLength-1,iY+m_edgeLength-1);
72  gVirtualX->DrawLine(iID, iContext, iX, iY+m_edgeLength-1, iX+m_edgeLength-1,iY+m_edgeLength-1);
73  gVirtualX->DrawLine(iID, iContext, iX, iY, iX,iY+m_edgeLength-1);
74 
75  drawInsideBox(iID,iContext, iX+1, iY+1, m_edgeLength-2);
76 }
77 
78 //
79 // static member functions
80 //
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:50
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