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

VCF::DefaultColumnItem Class Reference

Class DefaultColumnItem documentation. More...

#include <vcf/ApplicationKit/DefaultColumnItem.h>

Inheritance diagram for VCF::DefaultColumnItem:

VCF::ColumnItem VCF::Item VCF::Component VCF::ObjectWithEvents VCF::Object List of all members.

Public Member Functions

 DefaultColumnItem ()
virtual ~DefaultColumnItem ()
virtual bool containsPoint (Point *pt)
 This is called to determine if a given point is within the bounds of the item.
virtual uint32 getIndex ()
 Returns the index of the item within it's model.
virtual void setIndex (const uint32 &index)
virtual void * getData ()
 Returns some application defined data.
virtual void setData (void *data)
 Sets the application defined data.
virtual String getCaption ()
 returns the caption for the column item
virtual void setCaption (const String &caption)
 sets the caption of the column.
virtual double getWidth ()
 returns the width of the coumn.
virtual void setWidth (const double &width)
 sets the width of the column
virtual void setCaptionAlignment (const TextAlignmentType &alignment)
 sets the alignment of the caption.
virtual TextAlignmentType getCaptionAlignment ()
 gets the current alignment type fopr the column.
virtual void paint (GraphicsContext *context, Rect *paintRect)
virtual bool isSelected ()
virtual void setSelected (const bool &selected)
virtual int32 getImageIndex ()
virtual void setImageIndex (const int32 &imageIndex)
virtual RectgetBounds ()
 returns the Bounds for the Item or NULL if not applicable.
virtual bool canPaint ()
 indicates whether the item can paint itself.
virtual void setBounds (Rect *bounds)
virtual int32 getStateImageIndex ()
 not supported
virtual void setStateImageIndex (const int32 &index)
 not supported

Protected Attributes

String caption_
void * data_
uint32 index_
Rect bounds_
bool selected_
int32 imageIndex_
double width_
TextAlignmentType textAlignment_

Detailed Description

Class DefaultColumnItem documentation.


Constructor & Destructor Documentation

VCF::DefaultColumnItem::DefaultColumnItem  ) 
 

virtual VCF::DefaultColumnItem::~DefaultColumnItem  )  [virtual]
 


Member Function Documentation

virtual bool VCF::DefaultColumnItem::canPaint  )  [inline, virtual]
 

indicates whether the item can paint itself.

In general this is often false, but when true, the control that contains the item should call the item's paint() method whenever the item needs repainting.

Implements VCF::Item.

virtual bool VCF::DefaultColumnItem::containsPoint Point pt  )  [virtual]
 

This is called to determine if a given point is within the bounds of the item.

The bounds may be slightly different than what is returned by getBounds(). For example, an item may not support getBounds(), but may have a non-rectangular region and may implement containsPoint() accordingly.

Implements VCF::Item.

virtual Rect* VCF::DefaultColumnItem::getBounds  )  [inline, virtual]
 

returns the Bounds for the Item or NULL if not applicable.

Implements VCF::Item.

virtual String VCF::DefaultColumnItem::getCaption  )  [virtual]
 

returns the caption for the column item

Returns:
String the column's caption

Implements VCF::ColumnItem.

virtual TextAlignmentType VCF::DefaultColumnItem::getCaptionAlignment  )  [inline, virtual]
 

gets the current alignment type fopr the column.

Returns:
TextAlignmentType the alignment type of the column
See also:
setCaptionAlignment()

Implements VCF::ColumnItem.

virtual void* VCF::DefaultColumnItem::getData  )  [inline, virtual]
 

Returns some application defined data.

This can be anything you want, hence the void* storage.

Implements VCF::Item.

virtual int32 VCF::DefaultColumnItem::getImageIndex  )  [inline, virtual]
 

Implements VCF::Item.

virtual uint32 VCF::DefaultColumnItem::getIndex  )  [virtual]
 

Returns the index of the item within it's model.

Implements VCF::Item.

virtual int32 VCF::DefaultColumnItem::getStateImageIndex  )  [inline, virtual]
 

not supported

Implements VCF::Item.

virtual double VCF::DefaultColumnItem::getWidth  )  [inline, virtual]
 

returns the width of the coumn.

The width should always be greater than or equal to 0

Implements VCF::ColumnItem.

virtual bool VCF::DefaultColumnItem::isSelected  )  [virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::paint GraphicsContext context,
Rect paintRect
[virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setBounds Rect bounds  )  [virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setCaption const String caption  )  [virtual]
 

sets the caption of the column.

If the text is wider than the current width of the column it will be truncated to fit and drawn with an ellipsis ("...")

Parameters:
String the new column caption

Implements VCF::ColumnItem.

virtual void VCF::DefaultColumnItem::setCaptionAlignment const TextAlignmentType alignment  )  [virtual]
 

sets the alignment of the caption.

Setting the caption alignment determines how the caption is drawn and to which side the text is aligned. You can align it to the left, right, or center.

Parameters:
TextAlignmentType teh alignment type for the column when it is drawn

Implements VCF::ColumnItem.

virtual void VCF::DefaultColumnItem::setData void *  data  )  [virtual]
 

Sets the application defined data.

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setImageIndex const int32 imageIndex  )  [virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setIndex const uint32 index  )  [virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setSelected const bool &  selected  )  [virtual]
 

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setStateImageIndex const int32 index  )  [inline, virtual]
 

not supported

Implements VCF::Item.

virtual void VCF::DefaultColumnItem::setWidth const double &  width  )  [virtual]
 

sets the width of the column

Parameters:
double width - the new column width

Implements VCF::ColumnItem.


Member Data Documentation

Rect VCF::DefaultColumnItem::bounds_ [protected]
 

String VCF::DefaultColumnItem::caption_ [protected]
 

void* VCF::DefaultColumnItem::data_ [protected]
 

int32 VCF::DefaultColumnItem::imageIndex_ [protected]
 

uint32 VCF::DefaultColumnItem::index_ [protected]
 

bool VCF::DefaultColumnItem::selected_ [protected]
 

TextAlignmentType VCF::DefaultColumnItem::textAlignment_ [protected]
 

double VCF::DefaultColumnItem::width_ [protected]
 


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