GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ComboBoxText Class Reference

#include <ComboBoxText.H>

Inheritance diagram for ComboBoxText:
Inheritance graph
[legend]
Collaboration diagram for ComboBoxText:
Collaboration graph
[legend]

Public Member Functions

 ComboBoxText (void)
 
void setChangedCallback (GCallback callBack, void *data)
 
void getSelection (int &value)
 
void getSelection (char *value)
 
void getSelection (string &value)
 
void setSelection (int which)
 
int setSelection (char *text)
 
int setSelection (string text)
 
ComboBoxTextoperator<< (char *text)
 
ComboBoxTextoperator<< (string text)
 
- Public Member Functions inherited from Container
GtkWidget * getWidget (void)
 
GtkWidget * show (void)
 
GtkWidget * hide (void)
 
void setBorder (unsigned int size)
 
unsigned int getBorder (void)
 
Containeroperator<< (Container &b)
 
Containeroperator<< (Container *b)
 
virtual Containeroperator<< (GtkWidget *b)
 
Containeroperator<< (LinkList< GtkWidget * > &ll)
 
Containeroperator>> (GtkWidget *b)
 
Containeroperator>> (Container *b)
 
Containeroperator>> (Container &b)
 
- Public Member Functions inherited from Widget
virtual ~Widget ()
 Destructor. More...
 
GtkWidget * ref (void)
 
void unref (void)
 

Additional Inherited Members

- Protected Member Functions inherited from Container
virtual void pack (GtkWidget *obj)
 
- Protected Attributes inherited from Widget
GtkWidget * widget
 The container based widget. More...
 

Detailed Description

A combo widget : pull down list
ComboBoxTextTest.jpg

This is a simple to fill pull down list. It is operated like so :

combo<<"entry 1"<<"entry 2";
combo<<string("entry 3");
ComboBoxTextTest.open.jpg

Definition at line 33 of file ComboBoxText.H.

Constructor & Destructor Documentation

ComboBoxText::ComboBoxText ( void  )
inline

The Combo constructor

Definition at line 37 of file ComboBoxText.H.

Member Function Documentation

void ComboBoxText::getSelection ( int value)
inline
Get the selected number from the ComboBoxText
Parameters
valueThe number of the selected element (from zero)

Definition at line 59 of file ComboBoxText.H.

void ComboBoxText::getSelection ( char *  value)
inline
Get the selected text from the ComboBoxText
Parameters
valueThe character array to hold the selected text. NOTE: Ensure the length of the char * passed in is large enough to contain the selected text.

Definition at line 66 of file ComboBoxText.H.

void ComboBoxText::getSelection ( string &  value)
inline
Get the selected text from the ComboBoxText
Parameters
valueThe string to hold the selected text.

Definition at line 79 of file ComboBoxText.H.

ComboBoxText& ComboBoxText::operator<< ( char *  text)
inline
Overloads the input operator.

This allows the ComboBoxText to be loaded like so :

ComboBoxText()<<"entry 1"<<"entry 2";
Parameters
textThe character array to add to the combo box
Returns
This object for further use

Definition at line 140 of file ComboBoxText.H.

ComboBoxText& ComboBoxText::operator<< ( string  text)
inline
Overloads the input operator.

This allows the ComboBoxText to be loaded like so :

ComboBoxText()<<string("entry 1")<<string("entry 2");
Parameters
textThe string to add to the combo box
Returns
This object for further use

Definition at line 157 of file ComboBoxText.H.

void ComboBoxText::setChangedCallback ( GCallback  callBack,
void *  data 
)
inline

Set the callback for when the combo box is changed

Definition at line 52 of file ComboBoxText.H.

void ComboBoxText::setSelection ( int  which)
inline
Sets the ComboBoxText to 'which'
Parameters
whichThe item to set as actave or 'selected', indexed from zero (0 is the first entry).

Definition at line 92 of file ComboBoxText.H.

Here is the caller graph for this function:

int ComboBoxText::setSelection ( char *  text)
inline
Set the selection to the matched char array.

If the character array text is in the ComboBoxText, then set the ComboBoxText to select that item.

Parameters
textThe character array to search for in the ComboBoxText
Returns
0 on success, -1 if the text is not found

Definition at line 101 of file ComboBoxText.H.

Here is the call graph for this function:

int ComboBoxText::setSelection ( string  text)
inline

Definition at line 105 of file ComboBoxText.H.

Here is the call graph for this function:


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