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

VCF::ColumnItem Class Reference

A ColumnItem item is used to represent a single header column. More...

#include <vcf/ApplicationKit/ColumnItem.h>

Inheritance diagram for VCF::ColumnItem:

VCF::Item VCF::UIComponent VCF::Component VCF::ObjectWithCallbacks VCF::Object List of all members.

Public Member Functions

 ColumnItem ()
virtual ~ColumnItem ()
ColumnModelgetColumnModel ()
ColumnControllergetController ()
double getWidth ()
 returns the width of the coumn.
void setWidth (const double &width)
 sets the width of the column
void setCaptionAlignment (const TextAlignmentType &alignment)
 sets the alignment of the caption.
TextAlignmentType getCaptionAlignment ()
 gets the current alignment type fopr the column.
virtual uint32 getIndex () const
virtual void setIndex (const uint32 &index)
void setCaption (const String &caption)
 sets the caption of the column.
String getCaption ()
 returns the caption for the column item
virtual void paint (GraphicsContext *context, Rect *paintRect)

Protected Attributes

uint32 index_

Detailed Description

A ColumnItem item is used to represent a single header column.

ColumnItems can be found in the HeaderControl, and ListViewControl, and are used to display a series of rectangular shapes that each represent a column vertical column.


Constructor & Destructor Documentation

VCF::ColumnItem::ColumnItem  )  [inline]
 

virtual VCF::ColumnItem::~ColumnItem  )  [inline, virtual]
 


Member Function Documentation

String VCF::ColumnItem::getCaption  ) 
 

returns the caption for the column item

Returns:
String the column's caption

TextAlignmentType VCF::ColumnItem::getCaptionAlignment  ) 
 

gets the current alignment type fopr the column.

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

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

ColumnController* VCF::ColumnItem::getController  )  [inline]
 

virtual uint32 VCF::ColumnItem::getIndex  )  const [inline, virtual]
 

double VCF::ColumnItem::getWidth  ) 
 

returns the width of the coumn.

The width should always be greater than or equal to 0

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

Reimplemented from VCF::Item.

void VCF::ColumnItem::setCaption const String caption  ) 
 

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

void VCF::ColumnItem::setCaptionAlignment const TextAlignmentType alignment  ) 
 

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

virtual void VCF::ColumnItem::setIndex const uint32 index  )  [inline, virtual]
 

void VCF::ColumnItem::setWidth const double &  width  ) 
 

sets the width of the column

Parameters:
double width - the new column width


Member Data Documentation

uint32 VCF::ColumnItem::index_ [protected]
 


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