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() [1/2]

FWBoxIconBase::FWBoxIconBase ( unsigned int  iEdgeLength)

Definition at line 30 of file FWBoxIconBase.cc.

30 : m_edgeLength(iEdgeLength) {}

◆ ~FWBoxIconBase()

FWBoxIconBase::~FWBoxIconBase ( )
virtual

Definition at line 37 of file FWBoxIconBase.cc.

37 {}

◆ FWBoxIconBase() [2/2]

FWBoxIconBase::FWBoxIconBase ( const FWBoxIconBase )
privatedelete

Member Function Documentation

◆ draw()

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

Definition at line 58 of file FWBoxIconBase.cc.

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 }

References drawInsideBox(), and m_edgeLength.

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

◆ drawInsideBox()

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

◆ edgeLength()

unsigned int FWBoxIconBase::edgeLength ( ) const
inline

Definition at line 36 of file FWBoxIconBase.h.

36 { return m_edgeLength; }

References m_edgeLength.

Referenced by FWBoxIconButton::FWBoxIconButton().

◆ operator=()

const FWBoxIconBase& FWBoxIconBase::operator= ( const FWBoxIconBase )
privatedelete

Member Data Documentation

◆ m_edgeLength

unsigned int FWBoxIconBase::m_edgeLength
private

Definition at line 49 of file FWBoxIconBase.h.

Referenced by draw(), and edgeLength().

FWBoxIconBase::drawInsideBox
virtual void drawInsideBox(Drawable_t iID, GContext_t iContext, int iX, int iY, unsigned int iSize) const =0
FWBoxIconBase::m_edgeLength
unsigned int m_edgeLength
Definition: FWBoxIconBase.h:49