#include <Fireworks/Core/interface/FWCollectionSummaryModelCellRenderer.h>
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 | |
FWCheckBoxIcon * | m_checkBox |
FWColorBoxIcon * | m_colorBox |
TGGC * | m_colorContext |
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 32 of file FWCollectionSummaryModelCellRenderer.h.
Definition at line 38 of file FWCollectionSummaryModelCellRenderer.h.
FWCollectionSummaryModelCellRenderer::FWCollectionSummaryModelCellRenderer | ( | const TGGC * | iContext, |
const TGGC * | iSelectContext | ||
) |
Definition at line 39 of file FWCollectionSummaryModelCellRenderer.cc.
References m_colorBox, m_colorContext, FWColorBoxIcon::setColor(), and matplotRender::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] |
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().
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 | ||
) |
Definition at line 95 of file FWCollectionSummaryModelCellRenderer.cc.
References FWDisplayProperties::color(), FWEventItem::ModelInfo::displayProperties(), FWEventItem::ModelInfo::isSelected(), FWDisplayProperties::isVisible(), m_checkBox, m_colorContext, FWEventItem::modelInfo(), FWEventItem::modelName(), and FWCheckBoxIcon::setChecked().
Referenced by FWCollectionSummaryTableManager::rowHeader().
{ FWEventItem::ModelInfo mi = iItem->modelInfo(iIndex); FWTextTableCellRenderer::setData(iItem->modelName(iIndex),mi.isSelected()); m_checkBox->setChecked(mi.displayProperties().isVisible()); m_colorContext->SetForeground(gVirtualX->GetPixel(mi.displayProperties().color())); }
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, and kSeparation.
{ UInt_t w = FWTextTableCellRenderer::width(); return w+kIconSize+kIconSize+kSeparation+kSeparation; }
Definition at line 62 of file FWCollectionSummaryModelCellRenderer.h.
Referenced by draw(), setData(), and ~FWCollectionSummaryModelCellRenderer().
Definition at line 61 of file FWCollectionSummaryModelCellRenderer.h.
Referenced by draw(), FWCollectionSummaryModelCellRenderer(), and ~FWCollectionSummaryModelCellRenderer().
TGGC* FWCollectionSummaryModelCellRenderer::m_colorContext [private] |
Definition at line 63 of file FWCollectionSummaryModelCellRenderer.h.
Referenced by FWCollectionSummaryModelCellRenderer(), setData(), and ~FWCollectionSummaryModelCellRenderer().