VCF::HeaderControl Class Reference
Class HeaderControl documentation.
More...
#include <vcf/ApplicationKit/HeaderControl.h>
Inheritance diagram for VCF::HeaderControl:
List of all members.
|
Public Types |
| enum | HeaderControlEvents { COLUMN_ITEM_CLICKED = Control::CONTROL_EVENTS_LAST + 300,
COLUMN_ITEM_WIDTHCHANGED
} |
Public Member Functions |
| | HeaderControl () |
| virtual | ~HeaderControl () |
| ColumnModel * | getColumnModel () |
| void | setColumnModel (ColumnModel *model) |
| virtual ColumnItem * | addColumn (const String &columnName, const double &width=100.0) |
| void | addColumn (ColumnItem *column) |
| virtual ColumnItem * | insertColumn (const uint32 &index, const String &columnName, const double &width=100.0) |
| void | insertColumn (const uint32 &index, ColumnItem *column) |
| void | deleteColumn (const uint32 &index) |
| String | getColumnName (const uint32 &index) |
| void | setColumnName (const uint32 &index, const String &columnName) |
| double | getColumnWidth (const uint32 &index) |
| void | setColumnWidth (const uint32 &index, const double &width) |
| ImageList * | getImageList () |
| void | setImageList (ImageList *imageList) |
| ColumnItem * | isPtOverItem (Point *point) |
| virtual void | paint (GraphicsContext *context) |
| | Paints the control.
|
| virtual double | getPreferredHeight () |
| | returns the preferred height for this control.
|
| virtual double | getPreferredWidth () |
| | returns the preferred width for this control.
|
| TextAlignmentType | getTextAlignment () |
| void | setTextAlignment (const TextAlignmentType &textAlignment) |
| virtual void | mouseDown (MouseEvent *event) |
| | Called when one (or more) of the mouse buttons are held down.
|
| virtual void | mouseMove (MouseEvent *event) |
| | Called when the mouse moves over the control.
|
| virtual void | mouseUp (MouseEvent *event) |
| | Called when one (or more) of the mouse buttons are released.
|
| virtual void | handleEvent (Event *event) |
| | This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.
|
Public Attributes |
| VCF::Delegate | ColumnItemClicked |
| VCF::Delegate | ColumnWidthChanged |
Protected Member Functions |
| virtual void | paintColumn (GraphicsContext *context, Rect *paintRect, const uint32 &index, ColumnItem *item) |
Protected Attributes |
| ColumnModel * | columnModel_ |
| ImageList * | imageList_ |
| TextAlignmentType | textAlignment_ |
| ColumnItem * | draggingColumnItem_ |
| ColumnItem * | pressedColumn_ |
| double | minColumnWidth_ |
Detailed Description
Class HeaderControl documentation.
Member Enumeration Documentation
|
|
- Enumerator:
-
| COLUMN_ITEM_CLICKED |
|
| COLUMN_ITEM_WIDTHCHANGED |
|
|
Constructor & Destructor Documentation
| VCF::HeaderControl::HeaderControl |
( |
|
) |
|
|
| virtual VCF::HeaderControl::~HeaderControl |
( |
|
) |
[virtual] |
|
Member Function Documentation
| void VCF::HeaderControl::addColumn |
( |
ColumnItem * |
column |
) |
|
|
| virtual ColumnItem* VCF::HeaderControl::addColumn |
( |
const String & |
columnName, |
|
|
const double & |
width = 100.0 |
|
) |
[virtual] |
|
| void VCF::HeaderControl::deleteColumn |
( |
const uint32 & |
index |
) |
|
|
| ColumnModel* VCF::HeaderControl::getColumnModel |
( |
|
) |
[inline] |
|
| String VCF::HeaderControl::getColumnName |
( |
const uint32 & |
index |
) |
|
|
| double VCF::HeaderControl::getColumnWidth |
( |
const uint32 & |
index |
) |
|
|
| ImageList* VCF::HeaderControl::getImageList |
( |
|
) |
[inline] |
|
| virtual double VCF::HeaderControl::getPreferredHeight |
( |
|
) |
[virtual] |
|
|
|
returns the preferred height for this control.
This is used when determing the height of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.
Reimplemented from VCF::Control. |
| virtual double VCF::HeaderControl::getPreferredWidth |
( |
|
) |
[virtual] |
|
|
|
returns the preferred width for this control.
This is used when determing the width of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.
Reimplemented from VCF::Control. |
| virtual void VCF::HeaderControl::handleEvent |
( |
Event * |
event |
) |
[virtual] |
|
|
|
This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.
Once inside the event the Control determines the type, and behaves accordingly, as well as notifying any appropriate listeners.
Reimplemented from VCF::Control. |
| void VCF::HeaderControl::insertColumn |
( |
const uint32 & |
index, |
|
|
ColumnItem * |
column |
|
) |
|
|
| virtual ColumnItem* VCF::HeaderControl::insertColumn |
( |
const uint32 & |
index, |
|
|
const String & |
columnName, |
|
|
const double & |
width = 100.0 |
|
) |
[virtual] |
|
| virtual void VCF::HeaderControl::mouseDown |
( |
MouseEvent * |
event |
) |
[virtual] |
|
|
|
Called when one (or more) of the mouse buttons are held down.
override this to provide specific behaviours when the mouse buttons are held down
Reimplemented from VCF::Control. |
| virtual void VCF::HeaderControl::mouseMove |
( |
MouseEvent * |
event |
) |
[virtual] |
|
|
|
Called when the mouse moves over the control.
override this to provide specific behaviours when the mouse moves over the control.
Reimplemented from VCF::Control. |
| virtual void VCF::HeaderControl::mouseUp |
( |
MouseEvent * |
event |
) |
[virtual] |
|
|
|
Called when one (or more) of the mouse buttons are released.
override this to provide specific behaviours when the mouse buttons are released.
Reimplemented from VCF::Control. |
| virtual void VCF::HeaderControl::paint |
( |
GraphicsContext * |
context |
) |
[virtual] |
|
|
|
Paints the control.
Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method.
If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly.
Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself. - See also:
- getAllowPaintNotification
Reimplemented from VCF::CustomControl. |
| void VCF::HeaderControl::setColumnModel |
( |
ColumnModel * |
model |
) |
|
|
| void VCF::HeaderControl::setColumnName |
( |
const uint32 & |
index, |
|
|
const String & |
columnName |
|
) |
|
|
| void VCF::HeaderControl::setColumnWidth |
( |
const uint32 & |
index, |
|
|
const double & |
width |
|
) |
|
|
| void VCF::HeaderControl::setImageList |
( |
ImageList * |
imageList |
) |
|
|
| void VCF::HeaderControl::setTextAlignment |
( |
const TextAlignmentType & |
textAlignment |
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following file: