Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PG_ColumnItem Class Reference

Inheritance diagram for PG_ColumnItem:

Inheritance graph
[legend]
Collaboration diagram for PG_ColumnItem:

Collaboration graph
[legend]
List of all members.

Detailed Description

ListBoxItem with multiple columns.

Author:
Alexander Pipelka

This is a multi-column item that can be inserted into the PG_ListBox


Public Member Functions

 PG_ColumnItem (PG_Widget *parent, Uint32 columns, Uint16 height, void *userdata=NULL)
 Construct a new PG_ColumnItem object.

 ~PG_ColumnItem ()
void SetColumnWidth (Uint32 column, Uint32 width)
 Set the width of a column (in pixels).

int GetColumnWidth (Uint32 column)
 Get the width of a column.

void SetColumnText (Uint32 column, const char *text)
 Set the text of a column.

const char * GetColumnText (Uint32 column)
 Get the text of a column.

int GetColumnCount ()

Protected Member Functions

void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 overridable eventhandler to blit the widget contents to the screen


Constructor & Destructor Documentation

PG_ColumnItem::PG_ColumnItem PG_Widget parent,
Uint32  columns,
Uint16  height,
void *  userdata = NULL
 

Construct a new PG_ColumnItem object.

Parameters:
columns number of columns this item should hold.
height height of the item in pixels.
userdata pointer to userdata this item should refer to.

PG_ColumnItem::~PG_ColumnItem  ) 
 


Member Function Documentation

void PG_ColumnItem::eventBlit SDL_Surface *  surface,
const PG_Rect src,
const PG_Rect dst
[protected, virtual]
 

overridable eventhandler to blit the widget contents to the screen

Parameters:
surface pointer to SDL_Surface to be blitted
src source rectangle (client coordinates)
dst destination rectangle (screen coordinates) Override this eventhandler to perform custom blitting behaviour (without drawing onto the widget surface).

Reimplemented from PG_ListBoxItem.

int PG_ColumnItem::GetColumnCount  ) 
 

const char* PG_ColumnItem::GetColumnText Uint32  column  ) 
 

Get the text of a column.

Parameters:
column index of the column.
Returns:
text of the column.

int PG_ColumnItem::GetColumnWidth Uint32  column  ) 
 

Get the width of a column.

Parameters:
column index of the column.
Returns:
width of the column.

void PG_ColumnItem::SetColumnText Uint32  column,
const char *  text
 

Set the text of a column.

Parameters:
column index of the column to change (starting at 0).
text new text of the column.

void PG_ColumnItem::SetColumnWidth Uint32  column,
Uint32  width
 

Set the width of a column (in pixels).

Parameters:
column index of the column to change (starting at 0).
width new width of the column (in pixels).


The ParaGUI Project - Alexander Pipelka