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

PG_ColumnItem Class Reference

ListBoxItem with multiple columns. More...

#include <pgcolumnitem.h>

Inheritance diagram for PG_ColumnItem:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_ColumnItem (PG_Widget *parent, Uint32 columns, Uint16 height, void *userdata=NULL, const std::string &style="ListBoxItem")
 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 std::string &text)
 Set the text of a column.
const PG_String & 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

Detailed Description

ListBoxItem with multiple columns.

Author:
Alexander Pipelka
This is a multi-column item that can be inserted into the PG_ListBox

Definition at line 48 of file pgcolumnitem.h.


Constructor & Destructor Documentation

PG_ColumnItem::PG_ColumnItem PG_Widget parent,
Uint32  columns,
Uint16  height,
void *  userdata = NULL,
const std::string &  style = "ListBoxItem"
 

Construct a new PG_ColumnItem object.

Parameters:
parent parent widget or NULL
columns number of columns this item should hold.
height height of the item in pixels.
userdata pointer to userdata this item should refer to.
style Widgetstyle to use

Definition at line 31 of file pgcolumnitem.cpp.

References PG_String, PG_ListBoxBaseItem::SetUserData(), and PG_Rect::Width().

PG_ColumnItem::~PG_ColumnItem  ) 
 

Definition at line 47 of file pgcolumnitem.cpp.


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.

Definition at line 61 of file pgcolumnitem.cpp.

References PG_Widget::DrawText(), PG_ListBoxItem::eventBlit(), PG_Widget::GetTextSize(), PG_Rect::my_height, PG_Label::my_srfIcon, PG_Rect::my_width, and PG_Rect::PG_Rect().

int PG_ColumnItem::GetColumnCount  ) 
 

Definition at line 102 of file pgcolumnitem.cpp.

const PG_String & PG_ColumnItem::GetColumnText Uint32  column  ) 
 

Get the text of a column.

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

Definition at line 98 of file pgcolumnitem.cpp.

int PG_ColumnItem::GetColumnWidth Uint32  column  ) 
 

Get the width of a column.

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

Definition at line 94 of file pgcolumnitem.cpp.

void PG_ColumnItem::SetColumnText Uint32  column,
const std::string &  text
 

Set the text of a column.

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

Definition at line 56 of file pgcolumnitem.cpp.

References PG_Widget::Update().

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).

Definition at line 52 of file pgcolumnitem.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:50 2008 for Advanced Strategic Command by  doxygen 1.4.2