Name
Property Widget Facility -- Easy property widget creation.
Description
This functions allow the creation and management of a widget to show and get
numerical properties from the user without having to learn how to create a
widget with Gtk+.
It is specialy usefull within algorithms allowing the user with no Gtk+
knowledge to write algorithms which properties.
Details
struct property_t
typedef struct {
gchar *label; /* Some text to identify de value */
gfloat min; /* The minimun value */
gfloat max; /* The maximun value */
gfloat step; /* Value increments allowed */
} property_t; |
Descrives a single property value.
properties_create ()
properties_t* properties_create (const property_t property[],
const gint num_properties,
void (*notify) (void)); |
Creates a GtkWidget for the properties described in property.
properties_destroy ()
Destroys the properties widget, freeing all it's memory.
properties_get_widget ()
GtkWidget* properties_get_widget (const properties_t *properties); |
Retrives the widget created to hold all the properties.
properties_get_values ()
gfloat* properties_get_values (const properties_t *properties); |
Retrives the current values of all the properties representied in
properties.
properties_set_values ()
gint properties_set_values (properties_t *properties,
const gfloat value[]); |
Sets the values of all the properties stored in properties.
struct properties_t
typedef struct {
void (*notify)(void); /* will be called when ever a properties
* change.*/
GtkWidget *widget; /* is the main widget.*/
gint num_properties; /* number of entry and value elements */
GtkWidget **entry; /* is an array of all entry widgets */
gfloat *value; /* is an array of all property values */
} properties_t; |
Descrives everything there is to know about a properties widget.
NOTE: it's fields should not be accessed directly.