#include <Fireworks/TableWidget/interface/FWTextTableCellRenderer.h>
Public Types | |
enum | Justify { kJustifyLeft, kJustifyRight, kJustifyCenter } |
Public Member Functions | |
const std::string & | data () |
void | draw (Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight) override |
const TGFont * | font () const |
FWTextTableCellRenderer (const TGGC *iContext=&(getDefaultGC()), const TGGC *iHighlightContext=&(getDefaultHighlightGC()), Justify iJustify=kJustifyLeft) | |
FWTextTableCellRenderer (const FWTextTableCellRenderer &)=delete | |
const TGGC * | graphicsContext () const |
UInt_t | height () const override |
returns the minimum height of the cell to which the renderer is representing More... | |
const TGGC * | highlightContext () const |
const FWTextTableCellRenderer & | operator= (const FWTextTableCellRenderer &)=delete |
bool | selected () |
void | setData (const std::string &, bool isSelected) |
void | setData (const char *, bool isSelected) |
void | setGraphicsContext (const TGGC *iContext) |
void | setHighlightContext (const TGGC *context) |
void | setJustify (Justify) |
UInt_t | width () const override |
returns the minimum width of the cell to which the renderer is representing More... | |
~FWTextTableCellRenderer () override | |
Public Member Functions inherited from FWTableCellRendererBase | |
virtual void | buttonEvent (Event_t *iClickEvent, int iRelClickX, int iRelClickY) |
FWTableCellRendererBase () | |
FWTableCellRendererBase (const FWTableCellRendererBase &)=delete | |
const FWTableCellRendererBase & | operator= (const FWTableCellRendererBase &)=delete |
virtual | ~FWTableCellRendererBase () |
Static Public Member Functions | |
static const TGGC & | getDefaultGC () |
static const TGGC & | getDefaultHighlightGC () |
Private Attributes | |
const TGGC * | m_context |
std::string | m_data |
TGFont * | m_font |
const TGGC * | m_highlightContext |
bool | m_isSelected |
Justify | m_justify |
Description: A Cell Renderer who draws text and can show selection of a cell
Usage: Use when the cells of a table are simple text and you want to be able to also show that a cell has been selected.
Definition at line 32 of file FWTextTableCellRenderer.h.
Enumerator | |
---|---|
kJustifyLeft | |
kJustifyRight | |
kJustifyCenter |
Definition at line 37 of file FWTextTableCellRenderer.h.
FWTextTableCellRenderer::FWTextTableCellRenderer | ( | const TGGC * | iContext = &(getDefaultGC()) , |
const TGGC * | iHighlightContext = &(getDefaultHighlightGC()) , |
||
Justify | iJustify = kJustifyLeft |
||
) |
Definition at line 34 of file FWTextTableCellRenderer.cc.
References m_context, and m_font.
|
override |
Definition at line 49 of file FWTextTableCellRenderer.cc.
|
delete |
|
inline |
Definition at line 56 of file FWTextTableCellRenderer.h.
References m_data.
Referenced by FWTextTreeCellRenderer::draw(), FWTriggerTableView::saveImageTo(), and FWTableView::saveImageTo().
|
overridevirtual |
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()
Implements FWTableCellRendererBase.
Reimplemented in FWTextTreeCellRenderer.
Definition at line 66 of file FWTextTableCellRenderer.cc.
References DummyCfis::c, dX(), kJustifyCenter, kJustifyRight, FWTabularWidget::kTextBuffer, m_context, m_data, m_font, m_highlightContext, m_isSelected, m_justify, mergeResourcesJson::metrics, w(), and width().
Referenced by FWCollectionSummaryModelCellRenderer::draw(), FWCheckedTextTableCellRenderer::draw(), and FWColumnLabelCellRenderer::draw().
const TGFont * FWTextTableCellRenderer::font | ( | ) | const |
Definition at line 123 of file FWTextTableCellRenderer.cc.
References m_font.
Referenced by FWTextTreeCellRenderer::draw(), and FWColumnLabelCellRenderer::FWColumnLabelCellRenderer().
|
static |
Definition at line 128 of file FWTextTableCellRenderer.cc.
Referenced by FWPSetTableManager::cellRenderer(), and FWTextTreeCellRenderer::draw().
|
static |
Definition at line 133 of file FWTextTableCellRenderer.cc.
Referenced by FWPSetTableManager::FWPSetTableManager().
|
inline |
Definition at line 45 of file FWTextTableCellRenderer.h.
References m_context.
Referenced by FWCollectionSummaryModelCellRenderer::draw(), FWCheckedTextTableCellRenderer::draw(), FWColumnLabelCellRenderer::draw(), and FWTextTreeCellRenderer::draw().
|
overridevirtual |
returns the minimum height of the cell to which the renderer is representing
Implements FWTableCellRendererBase.
Definition at line 119 of file FWTextTableCellRenderer.cc.
References m_font.
Referenced by FWCheckedTextTableCellRenderer::buttonEvent(), FWCheckedTextTableCellRenderer::draw(), FWGeometryTableManagerBase::FWGeometryTableManagerBase(), and FWCheckedTextTableCellRenderer::width().
|
inline |
Definition at line 46 of file FWTextTableCellRenderer.h.
References m_highlightContext.
Referenced by FWTextTreeCellRenderer::draw().
|
delete |
|
inline |
Definition at line 60 of file FWTextTableCellRenderer.h.
References m_isSelected.
Referenced by FWTextTreeCellRenderer::draw().
void FWTextTableCellRenderer::setData | ( | const std::string & | iData, |
bool | isSelected | ||
) |
Definition at line 98 of file FWTextTableCellRenderer.cc.
References m_data, and m_isSelected.
Referenced by FWAdapterHeaderTableManager::cellRenderer(), FWTriggerTableViewTableManager::cellRenderer(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWOverlapTableManager::cellRenderer(), FWGeometryTableManager::cellRenderer(), FWPSetTableManager::cellRenderer(), DataAdderTableManager::cellRenderer(), and FWCollectionSummaryModelCellRenderer::setData().
void FWTextTableCellRenderer::setData | ( | const char * | iData, |
bool | isSelected | ||
) |
|
inline |
Definition at line 57 of file FWTextTableCellRenderer.h.
References m_context.
Referenced by FWTableViewTableManager::cellRenderer(), FWPSetTableManager::cellRenderer(), and FWGeometryTableManagerBase::setBackgroundToWhite().
|
inline |
Definition at line 58 of file FWTextTableCellRenderer.h.
References visDQMUpload::context, and m_highlightContext.
Referenced by FWGeometryTableManagerBase::FWGeometryTableManagerBase(), and FWPSetTableManager::FWPSetTableManager().
void FWTextTableCellRenderer::setJustify | ( | Justify | iJustify | ) |
|
overridevirtual |
returns the minimum width of the cell to which the renderer is representing
Implements FWTableCellRendererBase.
Reimplemented in FWTextTreeCellRenderer.
Definition at line 113 of file FWTextTableCellRenderer.cc.
References m_data, and m_font.
Referenced by draw(), FWCheckedTextTableCellRenderer::width(), FWColumnLabelCellRenderer::width(), FWCollectionSummaryModelCellRenderer::width(), and FWTextTreeCellRenderer::width().
|
private |
Definition at line 70 of file FWTextTableCellRenderer.h.
Referenced by draw(), FWTextTableCellRenderer(), graphicsContext(), and setGraphicsContext().
|
private |
|
private |
Definition at line 72 of file FWTextTableCellRenderer.h.
Referenced by draw(), font(), FWTextTableCellRenderer(), height(), and width().
|
private |
Definition at line 71 of file FWTextTableCellRenderer.h.
Referenced by draw(), highlightContext(), and setHighlightContext().
|
private |
Definition at line 74 of file FWTextTableCellRenderer.h.
Referenced by draw(), selected(), and setData().
|
private |
Definition at line 75 of file FWTextTableCellRenderer.h.
Referenced by draw(), and setJustify().