CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
const FWBoxIconBaseoperator= (const FWBoxIconBase &)
 

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 29 of file FWBoxIconBase.h.

Constructor & Destructor Documentation

FWBoxIconBase::FWBoxIconBase ( unsigned int  iEdgeLength)

Definition at line 32 of file FWBoxIconBase.cc.

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

Definition at line 42 of file FWBoxIconBase.cc.

43 {
44 }
FWBoxIconBase::FWBoxIconBase ( const FWBoxIconBase )
private

Member Function Documentation

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

Definition at line 66 of file FWBoxIconBase.cc.

References drawInsideBox(), and m_edgeLength.

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

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 }
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 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().

unsigned int FWBoxIconBase::edgeLength ( ) const
inline

Definition at line 38 of file FWBoxIconBase.h.

References m_edgeLength.

Referenced by FWBoxIconButton::FWBoxIconButton().

38 { return m_edgeLength;}
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:51
const FWBoxIconBase& FWBoxIconBase::operator= ( const FWBoxIconBase )
private

Member Data Documentation

unsigned int FWBoxIconBase::m_edgeLength
private

Definition at line 51 of file FWBoxIconBase.h.

Referenced by draw(), and edgeLength().