The Gnome Chemistry Utils  0.14.0
Functions
testgcuperiodic.c File Reference
#include <gcugtk/gcuperiodic.h>
#include <gcu/chemistry.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void on_changed (G_GNUC_UNUSED GcuPeriodic *periodic, guint Z, G_GNUC_UNUSED gpointer data)
void on_color_scheme_none (GtkToggleButton *btn, GtkWidget *periodic)
void on_color_scheme_default (GtkToggleButton *btn, GtkWidget *periodic)
int main (int argc, char *argv[])

Detailed Description

A simple example of the use of the GcuPeriodic widget.

Definition in file testgcuperiodic.c.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

The main function of the test program. It builds the window containing the GcuPeriodic widget, adds some buttons and installs the appropriate signals.

Definition at line 66 of file testgcuperiodic.c.

References GCU_PERIODIC, gcu_periodic_new(), on_changed(), on_color_scheme_default(), and on_color_scheme_none().

void on_changed ( G_GNUC_UNUSED GcuPeriodic periodic,
guint  Z,
G_GNUC_UNUSED gpointer  data 
)

The function called when the selected element changes. It just prints the atomic number of the selected element to the standard output.

Definition at line 37 of file testgcuperiodic.c.

Referenced by main().

void on_color_scheme_default ( GtkToggleButton *  btn,
GtkWidget *  periodic 
)

The function called when the "Default" button. It Just sets the "color-scheme" property of the GtkPeridic widget to GCU_PERIODIC_COLOR_DEFAULT if the button is active.

Definition at line 56 of file testgcuperiodic.c.

Referenced by main().

void on_color_scheme_none ( GtkToggleButton *  btn,
GtkWidget *  periodic 
)

The function called when the "None" button. It Just sets the "color-scheme" property of the GtkPeridic widget to GCU_PERIODIC_COLOR_NONE if the button is active.

Definition at line 46 of file testgcuperiodic.c.

Referenced by main().