Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::HeaderControl Class Reference

Class HeaderControl documentation. More...

#include <vcf/ApplicationKit/HeaderControl.h>

Inheritance diagram for VCF::HeaderControl:

VCF::CustomControl VCF::ColumnController VCF::Control VCF::UIComponent VCF::AbstractView VCF::Component VCF::View VCF::ObjectWithCallbacks VCF::Object 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 ()
virtual ColumnWidthChanged
void 
modelChanged (Model *oldModel, Model *newModel)
ColumnModelgetColumnModel ()
void setColumnModel (ColumnModel *model)
virtual ColumnItemaddColumn (const String &columnName, const double &width=100.0)
void addColumn (ColumnItem *column)
virtual ColumnIteminsertColumn (const uint32 &index, const String &columnName, const double &width=100.0)
void insertColumn (const uint32 &index, ColumnItem *column)
void deleteColumn (const uint32 &index)
ColumnItemgetColumnItem (const uint32 &index)
void setColumnItem (const uint32 &index, ColumnItem *item)
ImageListgetImageList ()
void setImageList (ImageList *imageList)
ColumnItemisPtOverItem (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.
virtual bool generatePropertyValue (const String &fullPropertyName, Property *property, VariantData *value, String &strValue)
virtual double getItemWidth (ColumnItem *item)
virtual void setItemWidth (ColumnItem *item, const double &val)
virtual TextAlignmentType getItemTextAlignment (ColumnItem *item)
virtual void setItemTextAlignment (ColumnItem *item, const TextAlignmentType &val)

Public Attributes

VCF::Delegate MouseDelegate
ColumnItemClicked VCF::Delegate ItemDelegate

Protected Member Functions

virtual void paintColumn (GraphicsContext *context, Rect *paintRect, const uint32 &index, ColumnItem *item)
void onColumnAdded (Event *e)
void onColumnRemoved (Event *e)
void onModelChanged (Event *e)

Protected Attributes

ImageListimageList_
TextAlignmentType textAlignment_
ColumnItemdraggingColumnItem_
ColumnItempressedColumn_
double minColumnWidth_
bool controlChangeToModel_
bool inCallbackChange_
Array< ColumnItem * > columnItems_

Detailed Description

Class HeaderControl documentation.


Member Enumeration Documentation

enum VCF::HeaderControl::HeaderControlEvents
 

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  ) 
 

virtual bool VCF::HeaderControl::generatePropertyValue const String fullPropertyName,
Property property,
VariantData value,
String strValue
[virtual]
 

Reimplemented from VCF::Control.

ColumnItem* VCF::HeaderControl::getColumnItem const uint32 index  ) 
 

ColumnModel* VCF::HeaderControl::getColumnModel  )  [inline]
 

ImageList* VCF::HeaderControl::getImageList  )  [inline]
 

virtual TextAlignmentType VCF::HeaderControl::getItemTextAlignment ColumnItem item  )  [virtual]
 

Implements VCF::ColumnController.

virtual double VCF::HeaderControl::getItemWidth ColumnItem item  )  [virtual]
 

Implements VCF::ColumnController.

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.

TextAlignmentType VCF::HeaderControl::getTextAlignment  )  [inline]
 

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]
 

ColumnItem* VCF::HeaderControl::isPtOverItem Point point  ) 
 

virtual ColumnWidthChanged void VCF::HeaderControl::modelChanged Model oldModel,
Model newModel
[virtual]
 

Reimplemented from VCF::Control.

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.

void VCF::HeaderControl::onColumnAdded Event e  )  [protected]
 

void VCF::HeaderControl::onColumnRemoved Event e  )  [protected]
 

void VCF::HeaderControl::onModelChanged Event e  )  [protected]
 

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.

virtual void VCF::HeaderControl::paintColumn GraphicsContext context,
Rect paintRect,
const uint32 index,
ColumnItem item
[protected, virtual]
 

void VCF::HeaderControl::setColumnItem const uint32 index,
ColumnItem item
 

void VCF::HeaderControl::setColumnModel ColumnModel model  ) 
 

void VCF::HeaderControl::setImageList ImageList imageList  ) 
 

virtual void VCF::HeaderControl::setItemTextAlignment ColumnItem item,
const TextAlignmentType val
[virtual]
 

Implements VCF::ColumnController.

virtual void VCF::HeaderControl::setItemWidth ColumnItem item,
const double &  val
[virtual]
 

Implements VCF::ColumnController.

void VCF::HeaderControl::setTextAlignment const TextAlignmentType textAlignment  ) 
 


Member Data Documentation

Array<ColumnItem*> VCF::HeaderControl::columnItems_ [protected]
 

bool VCF::HeaderControl::controlChangeToModel_ [protected]
 

ColumnItem* VCF::HeaderControl::draggingColumnItem_ [protected]
 

ImageList* VCF::HeaderControl::imageList_ [protected]
 

bool VCF::HeaderControl::inCallbackChange_ [protected]
 

ColumnItemClicked VCF::Delegate VCF::HeaderControl::ItemDelegate
 

double VCF::HeaderControl::minColumnWidth_ [protected]
 

VCF::Delegate VCF::HeaderControl::MouseDelegate
 

Event Delegate:
MouseDoubleClicked fires an MouseEvent, with a type set to Control::MOUSE_DBLCLICK. Fired whenever the control receives a double click from the mouse. This is triggered by the underlying windowing system.
event class: MouseEvent
event type: Control::MOUSE_DBLCLICK

Reimplemented from VCF::Control.

ColumnItem* VCF::HeaderControl::pressedColumn_ [protected]
 

TextAlignmentType VCF::HeaderControl::textAlignment_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information