#include <gdk/gdk.h>
#include <gtk/gtk.h>
Go to the source code of this file.
Defines | |
#define | GCU_TYPE_PERIODIC (gcu_periodic_get_type ()) |
#define | GCU_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_PERIODIC, GcuPeriodic)) |
#define | GCU_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_PERIODIC, GcuPeriodicClass)) |
#define | GCU_IS_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_PERIODIC)) |
#define | GCU_IS_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_PERIODIC)) |
#define | GCU_PERIODIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCU_TYPE_PERIODIC, GcuPeriodicClass)) |
Typedefs | |
typedef struct _GcuPeriodic | GcuPeriodic |
typedef struct _GcuPeriodicClass | GcuPeriodicClass |
typedef void(* | GcuPeriodicColorFunc )(int, GdkColor *, gpointer) |
Enumerations | |
enum | GcuPeriodicColorSchemes |
Functions | |
GType | gcu_periodic_get_type (void) G_GNUC_CONST |
GtkWidget * | gcu_periodic_new (void) |
guint | gcu_periodic_get_element (GcuPeriodic *periodic) |
void | gcu_periodic_set_element (GcuPeriodic *periodic, guint element) |
int | gcu_periodic_add_color_scheme (GcuPeriodic *periodic, GcuPeriodicColorFunc func, GtkWidget *extra_widget, gpointer user_data) |
void | gcu_periodic_set_colors (GcuPeriodic *periodic) |
Definition in file gcuperiodic.h.
#define GCU_IS_PERIODIC | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_PERIODIC)) |
Definition at line 66 of file gcuperiodic.h.
#define GCU_IS_PERIODIC_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_PERIODIC)) |
Definition at line 70 of file gcuperiodic.h.
#define GCU_PERIODIC | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_PERIODIC, GcuPeriodic)) |
Casts obj to a GcuPeriodic * pointer.
Definition at line 57 of file gcuperiodic.h.
Referenced by main().
#define GCU_PERIODIC_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_PERIODIC, GcuPeriodicClass)) |
Casts klass to a GcuPeriodicClass * pointer.
Definition at line 62 of file gcuperiodic.h.
#define GCU_PERIODIC_GET_CLASS | ( | obj | ) | (G_TYPE_INSTANCE_GET_CLASS ((obj), GCU_TYPE_PERIODIC, GcuPeriodicClass)) |
Definition at line 75 of file gcuperiodic.h.
#define GCU_TYPE_PERIODIC (gcu_periodic_get_type ()) |
typedef struct _GcuPeriodic GcuPeriodic |
The GcuPeriodic widget.
Definition at line 78 of file gcuperiodic.h.
typedef struct _GcuPeriodicClass GcuPeriodicClass |
The GcuPeriodic widget object class.
Definition at line 80 of file gcuperiodic.h.
typedef void(* GcuPeriodicColorFunc)(int, GdkColor *, gpointer) |
The callback used for color schemes. It takes three arguments:
Definition at line 124 of file gcuperiodic.h.
Predefined coloring scheme used for the buttons when displaying the periodic table of the GcuPeriodic widget. Possible values are:
Definition at line 43 of file gcuperiodic.h.
int gcu_periodic_add_color_scheme | ( | GcuPeriodic * | periodic, | |
GcuPeriodicColorFunc | func, | |||
GtkWidget * | extra_widget, | |||
gpointer | user_data | |||
) |
periodic | a GcuPeriodic widget. | |
func | the callback used to get the color for an element in the new color scheme. | |
extra_widget | a widget to be added as a child of periodic. | |
user_data | data to be passed to the func callback. |
guint gcu_periodic_get_element | ( | GcuPeriodic * | periodic | ) |
gcu_periodic_get_element:
periodic | a GcuPeriodic widget |
Returns: the atomic number of the currently selected element or 0 if none is selected.
GType gcu_periodic_get_type | ( | void | ) |
GtkWidget* gcu_periodic_new | ( | void | ) |
void gcu_periodic_set_colors | ( | GcuPeriodic * | periodic | ) |
periodic | a GcuPeriodic widget. |
void gcu_periodic_set_element | ( | GcuPeriodic * | periodic, | |
guint | element | |||
) |
gcu_periodic_set_element:
periodic | a GcuPeriodic widget | |
element | the atomic number of the element to select or 0 |