Bonobo API Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
char* bonobo_ui_util_pixbuf_to_xml ( |
The UI utilities do man things, mostly concerned with smoothing the flow of XML data from containee to container. There are also several generaly useful functions used internaly for manipulating pixmaps. Also, code for stringifying accelerators, fixing up help and working around libxml bugs. Also a large chunk of code is included for dynamic UI tree building that is now strongly deprecated by the various tools to do this from dynamic files.
char* bonobo_ui_util_pixbuf_to_xml ( |
Convert a pixbuf to a string representation suitable for passing as a "pixname" attribute with a pixtype attribute = "pixbuf".
pixbuf : | a GdkPixbuf |
Returns : | the stringified pixbuf. |
|
This converts a stringified pixbuf in xml into a GdkPixbuf
xml : | a string |
Returns : | a handed reference to the created GdkPixbuf. |
|
This routine returns a GdkPixbuf for a node, if prepend_menu is TRUE then if it is a stock pixbuf 'Menu_' will be prepended to the stock name. Otherwise the pixbuf is extracted either from the node, a filename, or the stock system.
node : | the node |
prepend_menu : | whether the pixbuf is for a menu item |
Returns : | A handed reference to the extracted pixbuf. |
|
This function extracts a pixbuf from the node and returns a GtkWidget containing a display of the pixbuf.
node : | the node |
prepend_menu : | whether the pixbuf is for a menu item |
Returns : | the widget. |
void bonobo_ui_util_xml_set_pixbuf (BonoboUINode *node, |
Associate pixbuf with this node by stringifying it and setting the requisite attributes.
node : | the node |
pixbuf : | the pixbuf |
void bonobo_ui_util_xml_set_pix_xpm (BonoboUINode *node, const char **xpm); |
Associate xpm with this node by stringifying it and setting the requisite attributes.
node : | the node |
xpm : | an xpm |
void bonobo_ui_util_xml_set_pix_stock (BonoboUINode *node, const char *name); |
Associate the stock pixmap named name with this node
node : | the node |
name : | the stock name |
void bonobo_ui_util_xml_set_pix_fname (BonoboUINode *node, const char *name); |
Associate a pixmap filename name with a node
node : | the node |
name : | the filename |
void bonobo_ui_util_build_help_menu ( |
This routine inserts all the help menu items appropriate for this application as children of the parent node.
listener : | associated component |
app_prefix : | |
app_name : | application name |
parent : | toplevel node |
BonoboUINode* bonobo_ui_util_build_accel ( |
This routine builds an accelerator node from the key and mod mask and associates it with a verb.
accelerator_key : | the accelerator key |
accelerator_mods : | the accelerator mods |
verb : | the associated verb. |
Returns : | the built node. |
BonoboUINode* bonobo_ui_util_new_menu ( |
A helper routine to create a menu or submenu with associated information - this routine is strongly deprecated.
submenu : | whether it is a menu or submenu |
name : | the path element name of the menu |
label : | the label |
tip : | the description |
verb : | the associated verb |
Returns : | the constructed node. |
BonoboUINode* bonobo_ui_util_new_placeholder (const char *name, |
A helper routine to create a menu or submenu with associated information - this routine is strongly deprecated - it is also broken.
name : | path element name of the placeholder |
top : | whether to delimit at the top |
bottom : | whether to delimit at the bottom |
Returns : | the new node |
void bonobo_ui_util_set_radiogroup (BonoboUINode *node, const char *group_name); |
This is a helper function that sets the radiogroup to the requested group - deprecated
node : | the node |
group_name : | the group name. |
void bonobo_ui_util_set_toggle (BonoboUINode *node, const char *id, const char *init_state); |
Deprecated, makes a node toggleable.
node : | the node |
id : | the associated id |
init_state : |
|
BonoboUINode* bonobo_ui_util_new_std_toolbar (const char *name, const char *label, const char *tip, const char *verb); |
Deprecated - created a new toolbar item.
name : |
|
label : |
|
tip : |
|
verb : |
|
Returns : |
|
BonoboUINode* bonobo_ui_util_new_toggle_toolbar (const char *name, const char *label, const char *tip, const char *id); |
Deprecated - creates a new toggle toolbar item
name : |
|
label : |
|
tip : |
|
id : |
|
Returns : |
|
char* bonobo_ui_util_get_ui_fname (const char *component_prefix, const char *file_name); |
Builds a path to the xml file that stores the GUI.
component_prefix : | |
file_name : | the file name of the xml file. |
Returns : | the path to the file that describes the UI or NULL if it is not found. |
void bonobo_ui_util_translate_ui (BonoboUINode *node); |
Quest through a tree looking for translatable properties ( those prefixed with an '_' ). Translates the value of the property and removes the leading '_'.
node : | the node to start at. |
void bonobo_ui_util_fixup_icons (BonoboUINode *node); |
This function is used to ensure filename pixbuf attributes are converted to in-line pixbufs on the server side, so that we don't sent a ( possibly invalid ) filename across the wire.
node : | the node |
void bonobo_ui_util_fixup_help ( |
This searches for 'BuiltMenuItems' placeholders, and then fills them with the application's menu items.
component : | the UI component |
node : | the node to search under |
app_prefix : | |
app_name : | the application name |
BonoboUINode* bonobo_ui_util_new_ui ( |
Loads an xml tree from a file, cleans the doc cruft from its nodes; and translates the nodes.
component : | The component help callback should be on |
fname : | |
app_prefix : | |
app_name : | Application name ( for finding help ) |
Returns : | The translated tree ready to be merged. |
void bonobo_ui_util_set_ui ( |
This function loads the UI from the associated file, translates it, fixes up all the menus, ensures pixbuf filenames are resolved to xml and then merges the XML to the remote container - this is the best and most simple entry point for the new UI code.
component : | the component |
app_prefix : | |
file_name : | the filename of the file to merge relative to the datadir. |
app_name : | the application name - for help merging |
void bonobo_ui_util_set_pixbuf ( |
This helper function sets a pixbuf at a certain path into an xml tree.
component : | the component |
path : | the path into the xml tree |
pixbuf : | the pixbuf |
|
This stringifies an accelerator_key and some accelerator_mods it is the converse of bonobo_ui_util_accel_parse
accelerator_key : | the key |
accelerator_mods : | the modifiers |
Returns : | the stringified representation |
void bonobo_ui_util_accel_parse (char *name, |
This parses the accelerator string and returns the key and mods associated with it - using a similar format to Gtk+ but one which doesn't involve inefficient XML entities and avoids other misc. problems.
name : | |
accelerator_key : | output of the key |
accelerator_mods : | output of the mods |
char* bonobo_ui_util_decode_str (const char *str, |
str : | |
err : | |
Returns : |
|