#include <libxml/parser.h>
Data Structures | |
struct | ROXOption |
Typedefs | |
typedef ROXOption | ROXOption |
typedef ROXOption | Option |
typedef void | ROXOptionNotify (void) |
typedef ROXOptionNotify | OptionNotify |
typedef GList *(* | ROXOptionBuildFn )(Option *option, xmlNode *node, gchar *label) |
typedef ROXOptionBuildFn | OptionBuildFn |
Functions | |
void | rox_options_init (const char *project) |
void | rox_options_init_with_domain (const char *project, const char *domain) |
void | rox_option_register_widget (char *name, ROXOptionBuildFn builder) |
void | rox_option_check_widget (ROXOption *option) |
void | rox_option_add_int (ROXOption *option, const gchar *key, int value) |
void | rox_option_add_string (ROXOption *option, const gchar *key, const gchar *value) |
void | rox_options_notify (void) |
void | rox_option_add_notify (ROXOptionNotify *callback) |
void | rox_option_add_saver (ROXOptionNotify *callback) |
GtkWidget * | rox_options_show (void) |
void | options_init (const char *project) |
void | options_init_with_domain (const char *project, const char *domain) |
void | options_notify (void) |
GtkWidget * | options_show (void) |
Manage a programs options in the same way as ROX-Filer does.
Derived from code written by Thomas Leonard, <tal197@users.sourceforge.net>.
How it works:
On startup:
When the user opens the Options box:
When the user changes an option or clicks on Revert:
When OK is clicked:
|
|
|
|
|
|
|
An option, stored as a string. It may have an integer value |
|
Type of function used to build custom option widgets
|
|
Type of function called when the options change |
|
Initialize the options system, normally called by rox_init().
|
|
Initialize the options system, normally called by rox_init_with_domain() if it detects
|
|
Call all the notify callbacks. This should happen after any options have their values changed. Set each option->has_changed flag before calling this function.
|
|
Allow the user to edit the options. Returns the window widget (you don't normally need this). NULL if already open.
|
|
Initialise and register a new integer option
|
|
Add a callback which will be called after any options have changed their values. If several options change at once, this is called after all changes.
|
|
Call 'callback' after all the options have been saved
|
|
Initialise and register a new string option
|
|
This is called when the widget's value is modified by the user. Reads the new value of the widget into the option and calls the notify callbacks.
|
|
When parsing the XML file, process an element named 'name' by calling 'builder(option, xml_node, label)'. builder returns the new widgets to add to the options box. name should be a static string. Call rox_option_check_widget() when the widget's value is modified.
Functions to set or get the widget's state can be stored in 'option'. If the option doesn't have a name attribute in Options.xml then ui will be
|
|
Initialize the options system, normally called by rox_init().
|
|
Initialize the options system, normally called by rox_init_with_domain() if it detects
|
|
Call all the notify callbacks. This should happen after any options have their values changed. Set each option->has_changed flag before calling this function. |
|
Allow the user to edit the options. Returns the window widget (you don't normally need this).
|