CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWBoxIconBase Class Referenceabstract

#include <Fireworks/Core/interface/FWBoxIconBase.h>

Inheritance diagram for FWBoxIconBase:
FWCheckBoxIcon FWColorBoxIcon

Public Member Functions

void draw (Drawable_t iID, GContext_t iContext, int iX, int iY) const
 
unsigned int edgeLength () const
 
 FWBoxIconBase (unsigned int iEdgeLength)
 
virtual ~FWBoxIconBase ()
 

Private Member Functions

virtual void drawInsideBox (Drawable_t iID, GContext_t iContext, int iX, int iY, unsigned int iSize) const =0
 
 FWBoxIconBase (const FWBoxIconBase &)=delete
 
const FWBoxIconBaseoperator= (const FWBoxIconBase &)=delete
 

Private Attributes

unsigned int m_edgeLength
 

Detailed Description

Description: Base class for rendering an icon which has a box as an outline

Usage: <usage>

Definition at line 28 of file FWBoxIconBase.h.

Constructor & Destructor Documentation

FWBoxIconBase::FWBoxIconBase ( unsigned int  iEdgeLength)

Definition at line 31 of file FWBoxIconBase.cc.

Referenced by edgeLength().

31  :
32 m_edgeLength(iEdgeLength)
33 {
34 }
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:50
FWBoxIconBase::~FWBoxIconBase ( )
virtual

Definition at line 41 of file FWBoxIconBase.cc.

42 {
43 }
FWBoxIconBase::FWBoxIconBase ( const FWBoxIconBase )
privatedelete

Member Function Documentation

void FWBoxIconBase::draw ( Drawable_t  iID,
GContext_t  iContext,
int  iX,
int  iY 
) const

Definition at line 65 of file FWBoxIconBase.cc.

References drawInsideBox(), and m_edgeLength.

Referenced by FWBoxIconButton::DoRedraw(), FWCollectionSummaryModelCellRenderer::draw(), and Vispa.Gui.PortConnection.PointToPointConnection::paintEvent().

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 }
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 void FWBoxIconBase::drawInsideBox ( Drawable_t  iID,
GContext_t  iContext,
int  iX,
int  iY,
unsigned int  iSize 
) const
privatepure virtual

Implemented in FWCheckBoxIcon, and FWColorBoxIcon.

Referenced by draw(), and edgeLength().

unsigned int FWBoxIconBase::edgeLength ( ) const
inline

Definition at line 37 of file FWBoxIconBase.h.

References drawInsideBox(), FWBoxIconBase(), m_edgeLength, and operator=().

Referenced by FWBoxIconButton::FWBoxIconButton().

37 { return m_edgeLength;}
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:50
const FWBoxIconBase& FWBoxIconBase::operator= ( const FWBoxIconBase )
privatedelete

Referenced by edgeLength().

Member Data Documentation

unsigned int FWBoxIconBase::m_edgeLength
private

Definition at line 50 of file FWBoxIconBase.h.

Referenced by draw(), and edgeLength().