CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWBoxIconBase Class Reference

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

Inheritance diagram for FWBoxIconBase:
FWCheckBoxIcon FWColorBoxIcon

List of all members.

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.

                                                    :
m_edgeLength(iEdgeLength)
{
}
FWBoxIconBase::~FWBoxIconBase ( ) [virtual]

Definition at line 42 of file FWBoxIconBase.cc.

{
}
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(), and FWCollectionSummaryModelCellRenderer::draw().

{
   //draw in background color
   gVirtualX->ClearArea(iID,iX,iY,m_edgeLength-1,m_edgeLength-1);
   //now draw foreground
   gVirtualX->DrawLine(iID, iContext, iX, iY, iX+m_edgeLength-1,iY);
   gVirtualX->DrawLine(iID, iContext, iX+m_edgeLength-1, iY, iX+m_edgeLength-1,iY+m_edgeLength-1);
   gVirtualX->DrawLine(iID, iContext, iX, iY+m_edgeLength-1, iX+m_edgeLength-1,iY+m_edgeLength-1);
   gVirtualX->DrawLine(iID, iContext, iX, iY, iX,iY+m_edgeLength-1);
   
   drawInsideBox(iID,iContext, iX+1, iY+1, m_edgeLength-2);
}
virtual void FWBoxIconBase::drawInsideBox ( Drawable_t  iID,
GContext_t  iContext,
int  iX,
int  iY,
unsigned int  iSize 
) const [private, pure 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().

{ return m_edgeLength;}
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().