gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
ComboBoxText Class Reference

#include <ComboBoxText.H>

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

Public Member Functions

 ComboBoxText (void)
 
 ComboBoxText (GCallback callBack, void *data)
 
gulong setChangedCallback (GCallback callBack, void *data)
 
void removeChangedCallback (gulong id)
 
void getSelection (int &value)
 
void getSelection (char *value)
 
void getSelection (string &value)
 
void setSelection (int which)
 
int setSelection (const char *text)
 
int setSelection (string text)
 
ComboBoxTextoperator<< (const char *text)
 
ComboBoxTextoperator<< (string text)
 
- Public Member Functions inherited from Container
void setBorder (unsigned int size)
 
unsigned int getBorder (void)
 
Containeroperator<< (Container &c)
 
Containeroperator<< (Container *c)
 
Containeroperator<< (Widget &w)
 
Containeroperator<< (Widget *w)
 
virtual Containeroperator<< (GtkWidget *w)
 
Containeroperator<< (LinkList< GtkWidget *> &ll)
 
Containeroperator>> (GtkWidget *w)
 
Containeroperator>> (Container *c)
 
Containeroperator>> (Container &c)
 
Containeroperator>> (LinkList< GtkWidget *> &ll)
 
void setChildrensSensitivity (bool sens)
 
bool areAnyChildrensSensitive (void)
 
unsigned int size ()
 
- Public Member Functions inherited from Widget
 Widget ()
 Construcotr. More...
 
 Widget (GtkWidget *w)
 
virtual ~Widget ()
 Destructor. More...
 
GtkWidget * ref (void)
 
void unref (void)
 
GtkWidget * show (void)
 
GtkWidget * hide (void)
 
bool getVisible (void)
 
GtkWidget * getWidget (void)
 
bool getSensitive (void)
 
void setSensitive (bool sens)
 
void getSize (int &width, int &height)
 
virtual void setSize (int width, int height)
 
void getLocationSize (int &x, int &y, int &width, int &height)
 
void queueDraw ()
 
GdkWindow * getWindow ()
 
void connect (const char *event, GCallback callback, gpointer data)
 
void connectAfter (const char *event, GCallback callback, gpointer data)
 
void connectExposeEventCallback (GCallback callback, void *data)
 
void connectExposeEventCallback (GtkWidget *w, GCallback callback, void *data)
 
void connectConfigureEventCallback (GCallback callback, void *data)
 
void connectConfigureEventCallback (GtkWidget *w, GCallback callback, void *data)
 
Widgetoperator<< (DragNDrop &dnd)
 
Widgetoperator>> (DragNDrop &dnd)
 

Static Public Member Functions

static void getSelection (GtkWidget *wid, string &value)
 

Private Member Functions

void init (void)
 

Additional Inherited Members

- Protected Member Functions inherited from Container
virtual void pack (GtkWidget *obj)
 
- Protected Member Functions inherited from Widget
virtual bool checkDropValidity (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData)
 
virtual bool dragDataReceived (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData, int length)
 
virtual void dragLeave (GtkWidget *w, GtkWidget *sourceWidget)
 
virtual bool dragMotion (GtkWidget *w, GtkWidget *sourceWidget, int x, int y)
 
virtual int chooseTheTargetToUse (GtkWidget *w, GtkWidget *sourceWidget, DragNDrop &dnd)
 
virtual void dragDataGet (GtkWidget *w, GtkSelectionData *selectionData, guint info)
 
virtual void dragDataDelete (GtkWidget *w)
 
virtual void dragBegin (GtkWidget *w)
 
virtual void dragEnd (GtkWidget *w)
 
- 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
Examples:
ComboBoxTextTest.C.

Definition at line 33 of file ComboBoxText.H.

Constructor & Destructor Documentation

◆ ComboBoxText() [1/2]

ComboBoxText::ComboBoxText ( void  )
inline

The Combo constructor

Definition at line 49 of file ComboBoxText.H.

Here is the call graph for this function:

◆ ComboBoxText() [2/2]

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

The Combo constructor which has a callback associated.

Parameters
callBackthe callback function to execute.
dataThe user data to pass to the callback function.

Definition at line 57 of file ComboBoxText.H.

Here is the call graph for this function:

Member Function Documentation

◆ getSelection() [1/4]

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 80 of file ComboBoxText.H.

◆ getSelection() [2/4]

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 87 of file ComboBoxText.H.

◆ getSelection() [3/4]

void ComboBoxText::getSelection ( string &  value)
inline

Get the selected text from the ComboBoxText

Parameters
valueThe string to hold the selected text.

Definition at line 100 of file ComboBoxText.H.

◆ getSelection() [4/4]

static void ComboBoxText::getSelection ( GtkWidget *  wid,
string &  value 
)
inlinestatic

Get the selected text from the ComboBoxText.

Parameters
widThe widget to get the selection from.
valueThe string to hold the selected text.

Definition at line 114 of file ComboBoxText.H.

◆ init()

void ComboBoxText::init ( void  )
inlineprivate

Definition at line 34 of file ComboBoxText.H.

Here is the caller graph for this function:

◆ operator<<() [1/2]

ComboBoxText& ComboBoxText::operator<< ( const 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 175 of file ComboBoxText.H.

◆ operator<<() [2/2]

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 192 of file ComboBoxText.H.

◆ removeChangedCallback()

void ComboBoxText::removeChangedCallback ( gulong  id)
inline

Remove the callback for when the combo box is changed

Parameters
idthe callback id to remove from the event execution list

Definition at line 73 of file ComboBoxText.H.

◆ setChangedCallback()

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

Set the callback for when the combo box is changed

Parameters
callBackthe callback function to execute.
dataThe user data to pass to the callback function.

Definition at line 66 of file ComboBoxText.H.

Here is the caller graph for this function:

◆ setSelection() [1/3]

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).
Examples:
ComboBoxTextTest.C.

Definition at line 127 of file ComboBoxText.H.

Here is the caller graph for this function:

◆ setSelection() [2/3]

int ComboBoxText::setSelection ( const 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 136 of file ComboBoxText.H.

Here is the call graph for this function:

◆ setSelection() [3/3]

int ComboBoxText::setSelection ( string  text)
inline

Definition at line 140 of file ComboBoxText.H.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
gtkIOStream: ComboBoxText Class Reference
GTK+ IOStream  Beta