GTK+ IOStream
Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
|
Class to setup buttons whic are either text, image or toggle types. Buttons are defined in terms of their callbacks functions and data as well as their type (image, text or toggle) You stream in any new buttons you want to create, for example : More...
#include <Buttons.H>
Public Member Functions | |
Buttons (void) | |
Constructor. More... | |
void | setAlignment (float xAlign, float yAlign) |
void | getAlignment (float *xAlign, float *yAlign) |
void | signalConnectAfter (labelFuncData nf) |
Destructor. More... | |
void | signalReplace (labelFuncData nfOld, labelFuncData nfNew) |
disconnect the old callback and reconnect a new callback More... | |
void | signalRemove (labelFuncData nfOld) |
disconnect the old callback and reconnect a new callback More... | |
Buttons & | operator<< (labelFuncData nf) |
generate a label button More... | |
Buttons & | operator<< (const pixmapFuncData nf) |
generate a button with a static pixmap More... | |
Buttons & | operator<< (toggleFuncData nf) |
generate a toggle button with label More... | |
Buttons & | operator<< (const pixmapFuncDataTransparent pfdt) |
generate a button with a pixmap which is partially transparent More... | |
Buttons & | operator<< (arrowFuncData af) |
generate an arrow button If the arrow widget is supplied in the arrowFuncData class, then it will be used instead of generating a new one. See arroFuncData for the various class member variables which are used in this method. More... | |
Buttons & | operator<< (radioFuncData nf) |
generate a radio button with label If other radio buttons are present, then they are all added to the same group More... | |
void | setLabelsFont (PangoFontDescription *pangoFontDescription) |
int | findIndex (GtkWidget *widget) |
GtkWidget * | findWidget (int index) |
![]() | |
LinkList (void) | |
Initialiser This is for the first element - links to itself. More... | |
virtual | ~LinkList (void) |
Small cleanup ... More... | |
void | add (GtkWidget *newElement) |
Adds as the current element ... Added to the next of the current lug. More... | |
GtkWidget * | change (GtkWidget *changeElement) |
exchange lugs The current lug is replaced with this lug. More... | |
GtkWidget * | remove (void) |
remove the current lug from the LinkList The current lug is removed form the list and passed back to the caller. More... | |
GtkWidget * | current (void) |
return a pointer to the current lug More... | |
GtkWidget * | next (void) |
Return a pointer to the next lug and move on to that lug Increments according to dir (either forward or backwards). More... | |
GtkWidget * | prev (void) |
Return a pointer to the previous lug and move to that lug Increments against dir (either forward or backwards). More... | |
GtkWidget * | grab (int i) |
returns the i'th lug in the chain irrespective of direction More... | |
int | getCount (void) |
Static Public Member Functions | |
static gboolean | exposePixmap (GtkWidget *widget, GdkEventExpose *event, gpointer data) |
overlay the pixmap image onto the button whenever required This method allows transparent XPMs to be displayed on buttons. Whenever the background is changed, the transparent pixmap is re-drawn More... | |
Additional Inherited Members | |
![]() | |
enum | direction |
![]() | |
direction | dir |
The current direction. More... | |
Class to setup buttons whic are either text, image or toggle types. Buttons are defined in terms of their callbacks functions and data as well as their type (image, text or toggle) You stream in any new buttons you want to create, for example :
This will create a button with the display text, when pressed, the callbackFunc will be called with the dataVariable as a variable. You can add buttons to your window like so :
|
inlinestatic |
overlay the pixmap image onto the button whenever required This method allows transparent XPMs to be displayed on buttons. Whenever the background is changed, the transparent pixmap is re-drawn
widget The button to re-draw event the event (we are looking for an expose event) data The XPM pointer (char**) to use for display
Definition at line 320 of file Buttons.H.
|
inline |
|
inline |
Get the alignment within the button.
Operates on the GtkWidget* which is LinkList::current - i.e. currently pointed to Fills the pointers to the floats with the alignment settings.
xAlign | the x-alignment 0.0 is a left alignment, 1.0 is for right alignment |
yAlign | the y-alignment 0.0 is a left alignment, 1.0 is for right alignment |
Definition at line 173 of file Buttons.H.
|
inline |
generate a label button
labelFuncData | The label, callback function and data to show. |
Definition at line 219 of file Buttons.H.
|
inline |
generate a button with a static pixmap
pixmapFuncData | The pixmap, callback function and data to show. |
Definition at line 235 of file Buttons.H.
|
inline |
generate a toggle button with label
toggleFuncData | The label, callback function and data to show. |
Definition at line 255 of file Buttons.H.
|
inline |
generate a button with a pixmap which is partially transparent
pixmapFuncDataTransparent | The pixmap, callback function and data to show. |
Definition at line 267 of file Buttons.H.
|
inline |
generate an arrow button If the arrow widget is supplied in the arrowFuncData class, then it will be used instead of generating a new one. See arroFuncData for the various class member variables which are used in this method.
arrowFuncData | The callback function, data, arrow type, shadow type and possibly a pre-existing arrow to use/show. If the pre-existing arrow is to be used, then the arrowFuncData.whichArrow and arrowFuncData.whichShdow variables are ignored. |
Definition at line 284 of file Buttons.H.
|
inline |
generate a radio button with label If other radio buttons are present, then they are all added to the same group
radioFuncData | The label, callback function and data to show. |
Definition at line 301 of file Buttons.H.
Set the alignment within the button.
Operates on the GtkWidget* which is LinkList::current - i.e. currently pointed to
xAlign | the x-alignment 0.0 is a left alignment, 1.0 is for right alignment |
yAlign | the y-alignment 0.0 is a left alignment, 1.0 is for right alignment |
Definition at line 162 of file Buttons.H.
|
inline |
Set the current botton's label's font
For example :
Definition at line 352 of file Buttons.H.
|
inline |
Destructor.
connect a callback to execute after the currently connected callbacks
nf | labelFuncData matching the callback to connect |
Definition at line 188 of file Buttons.H.
|
inline |
disconnect the old callback and reconnect a new callback
nfOld | labelFuncData matching the old callback to be removed |
nfNew | labelFuncData matching the new to be connected callback |
Definition at line 209 of file Buttons.H.
|
inline |
disconnect the old callback and reconnect a new callback
nfOld | labelFuncData matching the old callback to be removed |
nfNew | labelFuncData matching the new to be connected callback |
Definition at line 197 of file Buttons.H.