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

VDKCustomList Class Reference

This class wraps gtkclist widget. More...

#include <vdkclist.h>

Inheritance diagram for VDKCustomList:

VDKCustom VDKObject VDKNotCopyAble VDKCustomSortedList List of all members.

Public Member Functions

Public Attributes


Detailed Description

This class wraps gtkclist widget.

Signals
Tip
Use Selected property property like this:
VDKPoint p = list->Selected; int row = p.x; int col = p.y; // or simpler int row = list->Selected.Row(); int col = list->Selected.Col();
Programming hints
Data contained into a VDKCustomList are organized as a list of tuples, a VDKTuple is a derived clas of an VDKArray<VDKString> that add equality and less-than operators (See vdkclist.h for further informations). You can access to data using [] operator on Tuples property like this:
VDKTuple tuple = list->Tuples[j]; // access to j-th tuple VDKString s = list->Tuples[j][i]; // access to j-th,i-th string
Recall that Tuples is a read-only property, directly modifying a tuple does not reflect into the list widget, use VDKCustomList::UpdateRow() method at this end.
Examples
Into ./testvdk/testvdk.cc and .h


Constructor & Destructor Documentation

VDKCustomList::VDKCustomList VDKForm owner,
int  columns = 1,
char **  titles = NULL,
GtkSelectionMode  mode = GTK_SELECTION_SINGLE
 

Constructor.

Parameters:
columns columns number
titles array of titles strings
mode selection mode

VDKCustomList::~VDKCustomList  )  [virtual]
 

Destructor


Member Function Documentation

void VDKCustomList::AddRow char **  texts,
char **  pixdata = NULL,
int  col = 0
 

Add a row to list.

Parameters:
texts strings array to fill row cells
pixdata a cell can have a pixmap
wich column has the pixmap (if any)

void VDKCustomList::Clear  )  [virtual]
 

Clear widget

Reimplemented from VDKCustom.

void VDKCustomList::RemoveRow int  row  ) 
 

Removes a row

Parameters:
row,whic row should be removed

VDKPoint VDKCustomList::Selection  )  [inline]
 

Returns selected cell coordinates

VDKIntArray & VDKCustomList::Selections  ) 
 

Returns an array filled with all selected row number. Valid only in multiple or extended selection mode, in other cases array will have size == 0

void VDKCustomList::SelectRow VDKPoint  p  )  [inline]
 

Selects a row

Parameters:
p,cell coordinates

void VDKCustomList::SelectRow int  row,
int  col
 

Selects a row

Parameters:
row,cell coordinate
col 

VDKPoint VDKCustomList::Unselection  )  [inline]
 

Returns unselected cell coordinates

void VDKCustomList::UnselectRow VDKPoint  p  )  [inline]
 

Selects a row

Parameters:
p,cell coordinates

void VDKCustomList::UnselectRow int  row,
int  col
 

Unselects a row

Parameters:
row,cell coordinate
col 

void VDKCustomList::UpdateCell int  row,
int  col,
const char *  s,
char **  pixdata = NULL
 

Updates a cell

Parameters:
row cell coordinates
col 
pixdata a cell can have a pixmap
wich column has the pixmap (if any)

void VDKCustomList::UpdateRow int  row,
Tuple t,
char **  pixdata = NULL,
int  col = 0
 

Same as above

void VDKCustomList::UpdateRow int  row,
char **  s,
char **  pixdata = NULL,
int  col = 0
 

Updates a row

Parameters:
row wich row should be updated
pixdata a cell can have a pixmap
wich column has the pixmap (if any)


Member Data Documentation

VDKSignal2<void, int, int> VDKCustomList::OnRowMove
 

Extended LS signal system: Received when a row is moved

Parameters:
int from
int to

VDKSignal2<void, int, int> VDKCustomList::OnRowSelect
 

Extended LS signal system: Received when a cell is selected

Parameters:
int row
int column

VDKSignal2<void, int, int> VDKCustomList::OnRowUnselect
 

Extended LS signal system: Received when a cell is unselected

Parameters:
int row
int column

SelectionProp VDKCustomList::Selected
 

Use this to know wich cell is selected or Selected.Row() or Selected.Col() <read-only>

TupleList VDKCustomList::Tuples
 

A tuple is a VDKArray<VDKString>. use this property to access data on row/cell basis like this:

Tuple tuple = list->Tuples[0]; char * p = (char*) tuple[0]; // or more simply char *p = (char*) list->Tuples[0][0];

SelectionProp VDKCustomList::Unselected
 

Use this to know wich cell is unselected or Unselected.Row() or Unselected.Col() <read-only>


The documentation for this class was generated from the following files:
Generated on Wed Jul 28 17:23:54 2004 for vdk 2.0.3 by doxygen 1.3.7