CMS 3D CMS Logo

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

Private Member Functions

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

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 30 of file FWBoxIconBase.cc.

30 : m_edgeLength(iEdgeLength) {}
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:49
FWBoxIconBase::~FWBoxIconBase ( )
virtual

Definition at line 37 of file FWBoxIconBase.cc.

37 {}
FWBoxIconBase::FWBoxIconBase ( const FWBoxIconBase )
delete

Member Function Documentation

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

Definition at line 58 of file FWBoxIconBase.cc.

References drawInsideBox(), and m_edgeLength.

Referenced by FWBoxIconButton::DoRedraw(), and FWCollectionSummaryModelCellRenderer::draw().

58  {
59  //draw in background color
60  gVirtualX->ClearArea(iID, iX, iY, m_edgeLength - 1, m_edgeLength - 1);
61  //now draw foreground
62  gVirtualX->DrawLine(iID, iContext, iX, iY, iX + m_edgeLength - 1, iY);
63  gVirtualX->DrawLine(iID, iContext, iX + m_edgeLength - 1, iY, iX + m_edgeLength - 1, iY + m_edgeLength - 1);
64  gVirtualX->DrawLine(iID, iContext, iX, iY + m_edgeLength - 1, iX + m_edgeLength - 1, iY + m_edgeLength - 1);
65  gVirtualX->DrawLine(iID, iContext, iX, iY, iX, iY + m_edgeLength - 1);
66 
67  drawInsideBox(iID, iContext, iX + 1, iY + 1, m_edgeLength - 2);
68 }
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:49
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 36 of file FWBoxIconBase.h.

References m_edgeLength.

Referenced by FWBoxIconButton::FWBoxIconButton().

36 { return m_edgeLength; }
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:49
const FWBoxIconBase& FWBoxIconBase::operator= ( const FWBoxIconBase )
delete

Member Data Documentation

unsigned int FWBoxIconBase::m_edgeLength
private

Definition at line 49 of file FWBoxIconBase.h.

Referenced by draw(), and edgeLength().