pcb 4.1.1
An interactive printed circuit board layout editor.
|
00001 /* This is the modified GtkSpinbox used for entering Coords. 00002 * Hopefully it can be used as a template whenever we migrate the 00003 * rest of the Gtk HID to use GObjects and GtkWidget subclassing. 00004 */ 00005 #ifndef GHID_COORD_ENTRY_H__ 00006 #define GHID_COORD_ENTRY_H__ 00007 00008 #include <glib.h> 00009 #include <glib-object.h> 00010 00011 G_BEGIN_DECLS /* keep c++ happy */ 00012 00013 #define GHID_COORD_ENTRY_TYPE (ghid_coord_entry_get_type ()) 00014 #define GHID_COORD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_COORD_ENTRY_TYPE, GHidCoordEntry)) 00015 #define GHID_COORD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GHID_COORD_ENTRY_TYPE, GHidCoordEntryClass)) 00016 #define IS_GHID_COORD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_COORD_ENTRY_TYPE)) 00017 #define IS_GHID_COORD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GHID_COORD_ENTRY_TYPE)) 00018 00019 typedef struct _GHidCoordEntry GHidCoordEntry; 00020 typedef struct _GHidCoordEntryClass GHidCoordEntryClass; 00021 00022 /* Step sizes */ 00023 enum ce_step_size { CE_TINY, CE_SMALL, CE_MEDIUM, CE_LARGE }; 00024 00025 GType ghid_coord_entry_get_type (void); 00026 GtkWidget* ghid_coord_entry_new (Coord min_val, Coord max_val, Coord value, 00027 const Unit *unit, enum ce_step_size step_size); 00028 void ghid_coord_entry_add_entry (GHidCoordEntry *ce, const gchar *name, const gchar *desc); 00029 gchar *ghid_coord_entry_get_last_command (GHidCoordEntry *ce); 00030 00031 Coord ghid_coord_entry_get_value (GHidCoordEntry *ce); 00032 void ghid_coord_entry_set_value (GHidCoordEntry *ce, Coord val); 00033 00034 G_END_DECLS /* keep c++ happy */ 00035 #endif