CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
FWTableCellRendererBase Class Referenceabstract

#include <Fireworks/TableWidget/interface/FWTableCellRendererBase.h>

Inheritance diagram for FWTableCellRendererBase:
FWFramedTextTableCellRenderer FWGeometryTableManagerBase::ColorBoxRenderer FWTextTableCellRenderer FWCheckedTextTableCellRenderer FWCollectionSummaryModelCellRenderer FWColumnLabelCellRenderer FWTextTreeCellRenderer

Public Member Functions

virtual void buttonEvent (Event_t *iClickEvent, int iRelClickX, int iRelClickY)
 
virtual void draw (Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight)=0
 
 FWTableCellRendererBase ()
 
virtual UInt_t height () const =0
 returns the minimum height of the cell to which the renderer is representing More...
 
virtual UInt_t width () const =0
 returns the minimum width of the cell to which the renderer is representing More...
 
virtual ~FWTableCellRendererBase ()
 

Private Member Functions

 FWTableCellRendererBase (const FWTableCellRendererBase &)
 
const FWTableCellRendererBaseoperator= (const FWTableCellRendererBase &)
 

Detailed Description

Description: base class for classes which handle drawing and interaction with cells in the table

Usage: Renderers do the actual drawing of data into the cell (via the 'draw' method) and can allow user interaction with a cell (via the 'buttonEvent' method). When drawing a cell in the table, FWTableWidget ask its held FWTableManagerBase for a FWTableCellRendererBase for that particular cell and then calls the 'draw' method. Similarly, when a mouse button is pressed while the cursor is in a particular cell, the FWTableWidget asks its held FWTableManagerBase for a FWTableCellRendererBase for that particular cell and then calls the 'buttonEvent' method. For efficiency reasons, we encourage the reuse of the same FWTableCellRendererBase instance for multiple cells. The FWTableWidget is written so that it always requests a renderer from the FWTableManagerBase thereby allowing this reuse to work even when the renderer holds state information particular for only one cell (e.g. color).

Classes which inherit from FWTableManagerBase are responsible for creating the appropriate FWTableCellRendererBase for the data held in the table's cells. When the FWTableWidget asks the FWTableManagerBase for a renderer for a particular cell, it is the FWTableManagerBase's job to reset the renderer so that it can properly draw and/or interact with that cell. To allow reuse of the same object, classes which inherit from FWTableCellRendererBase normally have 'setter' methods which are used to set the renderer so it can represent a particular cell.

One inherits from FWTableCellRendererBase in order to provide custom ways to view data in the cell or to customize how users interact with the cell. Inheritance can also be used to allow a renderer to work directly with data held by a FWTableManagerBase.

Definition at line 44 of file FWTableCellRendererBase.h.

Constructor & Destructor Documentation

FWTableCellRendererBase::FWTableCellRendererBase ( )

Definition at line 30 of file FWTableCellRendererBase.cc.

31 {
32 }
FWTableCellRendererBase::~FWTableCellRendererBase ( )
virtual

Definition at line 39 of file FWTableCellRendererBase.cc.

40 {
41 }
FWTableCellRendererBase::FWTableCellRendererBase ( const FWTableCellRendererBase )
private

Member Function Documentation

void FWTableCellRendererBase::buttonEvent ( Event_t *  iClickEvent,
int  iRelClickX,
int  iRelClickY 
)
virtual
Called when a mouse button event occurs when the cursor is over a particular cell: arguments

iClickEvent: the ROOT GUI event caused by the mouse button iRelClickX: the x position of the cursor click relative to the start of the cell drawing area iRelClickY: the y position of the cursor click relative to the start of the cell drawing area

Reimplemented in FWCheckedTextTableCellRenderer.

Definition at line 59 of file FWTableCellRendererBase.cc.

Referenced by FWTabularWidget::HandleButton().

60 {}
virtual void FWTableCellRendererBase::draw ( Drawable_t  iID,
int  iX,
int  iY,
unsigned int  iWidth,
unsigned int  iHeight 
)
pure 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()

Implemented in FWGeometryTableManagerBase::ColorBoxRenderer, FWTextTreeCellRenderer, FWTextTableCellRenderer, FWFramedTextTableCellRenderer, FWCollectionSummaryModelCellRenderer, FWColumnLabelCellRenderer, and FWCheckedTextTableCellRenderer.

Referenced by FWTabularWidget::DoRedraw(), and Vispa.Gui.PortConnection.PointToPointConnection::paintEvent().

virtual UInt_t FWTableCellRendererBase::height ( ) const
pure virtual
const FWTableCellRendererBase& FWTableCellRendererBase::operator= ( const FWTableCellRendererBase )
private
virtual UInt_t FWTableCellRendererBase::width ( ) const
pure virtual