The GcuPeriodic Widget displays a Periodic table of the elements, each element being represented in a toggle button. A test program is available in the tests directory of the Gnome Chemistry Utils source archive (source in testgcuperiodic.c).
This widget has one signal:
- "element-changed": void user_function (GtkWidget* periodic, guint Z, gpointer data).
This signal is raised when the selected element changes in the widget.
|periodic,:||the object which received the signal. |
|Z,:||the atomic number of the newly selected element or 0 if no element is selected. |
|data,:||user data set when the signal handler was connected.|
There are two properties:
- "can_unselect": gboolean (Read / Write).
When this property is set to TRUE, you can unselect the selected element by clicking on the active button, otherwise an element will always be selected. Default value is FALSE.
- "color-style": GcuPeriodicColorStyle (Read / Write).
This property is used to set the coloring scheme used for the buttons when displaying the periodic table. There are two predefined values:
- GCU_PERIODIC_COLOR_NONE: the default Gtk theme is used.
- GCU_PERIODIC_COLOR_DEFAULT: the default color for each element is used as returned by gcu_element_get_default_color. Other values can be added using gcu_periodic_add_color_scheme(). Default value is GCU_PERIODIC_COLOR_NONE.
Functions related to the GcuPeriodic Widget are described in the gcuperiodic.h page.