vdk 2.4.0
Public Member Functions | Public Attributes | List of all members
VDKCustomSortedList Class Reference

#include <vdkcsortlist.h>

Inheritance diagram for VDKCustomSortedList:
VDKCustomList VDKCustom VDKObject VDKNotCopyAble

Public Member Functions

 VDKCustomSortedList (VDKForm *owner, int keyPos, int columns=1, char **titles=NULL, GtkSelectionMode mode=GTK_SELECTION_SINGLE)
 ~VDKCustomSortedList ()
bool AddKey (char **s, char **pixdata=NULL, int col=0)
void UpdateKey (const char *key, char **s, char **pixdata=NULL, int col=0)
void UpdateCellKey (const char *key, int col, const char *s, char **pixdata=NULL)
void RemoveKey (const char *key)
int FindKey (const char *key)
int KeyPos ()
- Public Member Functions inherited from VDKCustomList
 VDKCustomList (VDKForm *owner, int columns=1, char **titles=NULL, GtkSelectionMode mode=GTK_SELECTION_SINGLE)
virtual ~VDKCustomList ()
void AddRow (char **texts, char **pixdata=NULL, int col=0)
void UpdateRow (int row, char **s, char **pixdata=NULL, int col=0)
void UpdateRow (int row, Tuple &t, char **pixdata=NULL, int col=0)
void UpdateCell (int row, int col, const char *s, char **pixdata=NULL)
void RemoveRow (int row)
VDKPoint Selection ()
VDKPoint Unselection ()
void SelectRow (int row, int col)
void SelectRow (VDKPoint p)
void UnselectRow (int row, int col)
void UnselectRow (VDKPoint p)
virtual void Clear ()
VDKIntArraySelections ()
- Public Member Functions inherited from VDKCustom
int ColumnClicked ()
GtkSelectionMode SelectionMode ()
GtkWidget * CustomWidget ()
void ActiveTitle (int col, bool flag=true)
void ActiveTitles (bool flag=true)
void EnableTitles (bool flag=true)
void Freeze ()
void Thaw ()
int Size ()
void ColumnSize (int col, int size)
void AutoResizeColumn (int col, bool flag)
virtual void SetForeground (VDKRgb, GtkStateType)
virtual void SetFont (VDKFont *)
- Public Member Functions inherited from VDKObject
VDKRgb GetBackground (GtkStateType state=GTK_STATE_NORMAL)
VDKRgb GetForeground (GtkStateType state=GTK_STATE_NORMAL)
 VDKObject (VDKForm *owner=NULL)
 VDKObject (VDKForm *owner, GtkWidget *widget)
virtual ~VDKObject ()
bool Destroy ()
virtual int isA ()
VDKFormOwner ()
virtual GtkWidget * Widget ()
GtkWidget * ConnectingWidget ()
GtkWidget * WrappedWidget ()
VDKFontGetFont ()
void SetVisible (bool visible)
bool GetVisible ()
void SetCursor (VDKCursorType)
VDKCursorType GetCursor ()
void SetSize (int w, int h)
void SetUsize (VDKPoint s)
virtual void SetTip (char *)
virtual void Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=0)
ItemListItems ()
void Draw (GdkRectangle *area=NULL)
virtual void Setup ()
void SignalEmit (int signal)
void SignalEmit (char *sig)
void SignalEmitParent (int signal)
void SignalEmitParent (char *sig)
void GrabFocus ()
VDKObjectParent (VDKObject *p=NULL)
int SignalConnect (VDKObject *obj, char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
int SignalConnect (char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
bool SignalDisconnect (int connection)
int EventConnect (VDKObject *obj, char *event, bool(VDKObject::*method)(VDKObject *, GdkEvent *), bool after=false)
int EventConnect (char *, bool(VDKObject::*)(VDKObject *, GdkEvent *), bool after=false)
bool EventDisconnect (int connection)

Public Attributes

bool Unique
- Public Attributes inherited from VDKCustomList
SelectionProp Selected
SelectionProp Unselected
TupleList Tuples
- Public Attributes inherited from VDKCustom
VDKReadWriteValueProp
< VDKCustom, GtkPolicyType > 
VPolicy
VDKReadWriteValueProp
< VDKCustom, GtkPolicyType > 
HPolicy
VDKReadWriteValueProp
< VDKCustom, GtkShadowType > 
BorderShadow
VDKReadWriteValueProp
< VDKCustom, int > 
RowHeight
VDKReadWriteValueProp
< VDKCustom, bool > 
AutoResize
VDKReadWriteValueProp
< VDKCustom, VDKRgb
SelectedForeground
VDKReadWriteValueProp
< VDKCustom, VDKRgb
UnselectedBackground
VDKReadWriteValueProp
< VDKCustom, VDKRgb
UnselectedForeground
VDKObjectArray Titles
VDKReadOnlyValueProp
< VDKCustom, int > 
SelectedTitle
- Public Attributes inherited from VDKObject
VDKReadWriteValueProp
< VDKObject, VDKRgb
NormalBackground
VDKReadWriteValueProp
< VDKObject, VDKFont * > 
Font
SizeObjectProp Usize
VDKReadWriteValueProp
< VDKObject, bool > 
Enabled
VDKReadWriteValueProp
< VDKObject, VDKCursorType > 
Cursor
VDKReadWriteValueProp
< VDKObject, bool > 
Visible

Additional Inherited Members

- Protected Member Functions inherited from VDKCustom
virtual void SetBackground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
- Protected Attributes inherited from VDKObject
VDKObjectSignal s_clicked
GtkWidget * widget
GtkWidget * sigwid
VDKObjectparent

Detailed Description

This class provides a sorted custom list

Programming tips
All methods act like in VDKCustomList but inserting rows in ascending order using a column as key. Currently only char* keys are supported.
EXAMPLES
./testvdk/sortlistwin.cc

Constructor & Destructor Documentation

VDKCustomSortedList::VDKCustomSortedList ( VDKForm owner,
int  keyPos,
int  columns = 1,
char **  titles = NULL,
GtkSelectionMode  mode = GTK_SELECTION_SINGLE 
)

Constructor

Parameters
owner
keyPosrepresent key column pos
titlesstring array of column titles
modeselection mode
VDKCustomSortedList::~VDKCustomSortedList ( )
inline

Destructor

Member Function Documentation

bool VDKCustomSortedList::AddKey ( char **  s,
char **  pixdata = NULL,
int  col = 0 
)

Adds a row in ascending order respect to a key

Parameters
sa strin array
pixdataa pixmap
colpixmap column position
int VDKCustomSortedList::FindKey ( const char *  key)

Returns row containing <key>, -1 if not found

int VDKCustomSortedList::KeyPos ( )
inline

Return key column position

void VDKCustomSortedList::RemoveKey ( const char *  key)

Remove the row containing <key>

Parameters
keykey to be removed
void VDKCustomSortedList::UpdateCellKey ( const char *  key,
int  col,
const char *  s,
char **  pixdata = NULL 
)

Update a single cell at row containing <key>

Parameters
keykey value to be updated
colcolumn position of the cell to be updated
pixdataa pixmap
void VDKCustomSortedList::UpdateKey ( const char *  key,
char **  s,
char **  pixdata = NULL,
int  col = 0 
)

Updates row containg <key>

Parameters
keykey value to be updated
sstring array
pixdataa pixmap pixmap column

Member Data Documentation

bool VDKCustomSortedList::Unique

Setting Unique to true (false is the default) forces the list to do not insert duplicate keys.


The documentation for this class was generated from the following files: