CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

FWCollectionSummaryModelCellRenderer Class Reference

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

Inheritance diagram for FWCollectionSummaryModelCellRenderer:
FWTextTableCellRenderer FWTableCellRendererBase

List of all members.

Public Types

enum  ClickHit { kMiss, kHitCheck, kHitColor }

Public Member Functions

ClickHit clickHit (int iX, int iY) const
virtual void draw (Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight)
 FWCollectionSummaryModelCellRenderer (const TGGC *iContext, const TGGC *iSelectContext)
void setData (const FWEventItem *iItem, int iIndex)
virtual UInt_t width () const
 returns the minimum width of the cell to which the renderer is representing
virtual ~FWCollectionSummaryModelCellRenderer ()

Private Member Functions

 FWCollectionSummaryModelCellRenderer (const FWCollectionSummaryModelCellRenderer &)
const
FWCollectionSummaryModelCellRenderer
operator= (const FWCollectionSummaryModelCellRenderer &)

Private Attributes

FWCheckBoxIconm_checkBox
FWColorBoxIconm_colorBox
TGGC * m_colorContext

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 32 of file FWCollectionSummaryModelCellRenderer.h.


Member Enumeration Documentation

Enumerator:
kMiss 
kHitCheck 
kHitColor 

Definition at line 38 of file FWCollectionSummaryModelCellRenderer.h.


Constructor & Destructor Documentation

FWCollectionSummaryModelCellRenderer::FWCollectionSummaryModelCellRenderer ( const TGGC *  iContext,
const TGGC *  iSelectContext 
)

Definition at line 39 of file FWCollectionSummaryModelCellRenderer.cc.

References m_colorBox, m_colorContext, FWColorBoxIcon::setColor(), and lumiQTWidget::t.

                                                                                                                     :
FWTextTableCellRenderer(iGC,iSelectContext),
m_colorBox( new FWColorBoxIcon(kIconSize)),
m_checkBox( new FWCheckBoxIcon(kIconSize))
{
   GCValues_t t = *(iGC->GetAttributes());
   m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&t,kTRUE);
   m_colorBox->setColor(m_colorContext->GetGC());
}
FWCollectionSummaryModelCellRenderer::~FWCollectionSummaryModelCellRenderer ( ) [virtual]

Definition at line 54 of file FWCollectionSummaryModelCellRenderer.cc.

References m_checkBox, m_colorBox, and m_colorContext.

{
   delete m_colorBox;
   delete m_checkBox;
   gClient->GetResourcePool()->GetGCPool()->FreeGC(m_colorContext->GetGC());
}
FWCollectionSummaryModelCellRenderer::FWCollectionSummaryModelCellRenderer ( const FWCollectionSummaryModelCellRenderer ) [private]

Member Function Documentation

FWCollectionSummaryModelCellRenderer::ClickHit FWCollectionSummaryModelCellRenderer::clickHit ( int  iX,
int  iY 
) const

Definition at line 107 of file FWCollectionSummaryModelCellRenderer.cc.

References kHitCheck, kHitColor, kIconSize, kMiss, and kSeparation.

Referenced by FWCollectionSummaryTableManager::buttonReleasedInRowHeader().

{
   if(iY < 0 || iY > static_cast<int>(kIconSize)) { return kMiss;}
   if(iX>=0 && iX<=static_cast<int>(kIconSize)) {return kHitCheck;}
   if(iX>=static_cast<int>(kIconSize+kSeparation) && iX <=static_cast<int>(kIconSize+kSeparation+kIconSize)) { return kHitColor;}
   return kMiss;
}
void FWCollectionSummaryModelCellRenderer::draw ( Drawable_t  iID,
int  iX,
int  iY,
unsigned int  iWidth,
unsigned int  iHeight 
) [virtual]

Called to draw a particular cell: arguments iID: the id for the drawable in the window. Needed in order to do calls to gVirtualX or to TGFont iX: screen x position that the cell drawing area starts iY: screen y position that the cell drawing area starts iWidth: width (x dimension) of cell drawing area. May be larger than value returned from width() iHeight: height (x dimension) of cell drawing area. May be larger than value returned from height()

Reimplemented from FWTextTableCellRenderer.

Definition at line 84 of file FWCollectionSummaryModelCellRenderer.cc.

References FWBoxIconBase::draw(), FWTextTableCellRenderer::graphicsContext(), kIconSize, kSeparation, m_checkBox, and m_colorBox.

{
   int dY = (iHeight-kIconSize)/2;
   m_checkBox->draw(iID,graphicsContext()->GetGC(),iX,iY+dY);
   m_colorBox->draw(iID,graphicsContext()->GetGC(),iX+kIconSize+kSeparation,iY+dY);
   FWTextTableCellRenderer::draw(iID, iX+kIconSize+kIconSize+kSeparation+kSeparation, iY, 
                                 iWidth-kIconSize-kIconSize-kSeparation-kSeparation, iHeight);
   return ;
}
const FWCollectionSummaryModelCellRenderer& FWCollectionSummaryModelCellRenderer::operator= ( const FWCollectionSummaryModelCellRenderer ) [private]
void FWCollectionSummaryModelCellRenderer::setData ( const FWEventItem iItem,
int  iIndex 
)
UInt_t FWCollectionSummaryModelCellRenderer::width ( ) const [virtual]

returns the minimum width of the cell to which the renderer is representing

Reimplemented from FWTextTableCellRenderer.

Definition at line 77 of file FWCollectionSummaryModelCellRenderer.cc.

References kIconSize, kSeparation, and w().


Member Data Documentation