pcb 4.1.1
An interactive printed circuit board layout editor.

ghid-coord-entry.h File Reference

#include <glib.h>
#include <glib-object.h>
Include dependency graph for ghid-coord-entry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GHID_COORD_ENTRY_TYPE   (ghid_coord_entry_get_type ())
#define GHID_COORD_ENTRY(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_COORD_ENTRY_TYPE, GHidCoordEntry))
#define GHID_COORD_ENTRY_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GHID_COORD_ENTRY_TYPE, GHidCoordEntryClass))
#define IS_GHID_COORD_ENTRY(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_COORD_ENTRY_TYPE))
#define IS_GHID_COORD_ENTRY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GHID_COORD_ENTRY_TYPE))

Typedefs

typedef struct _GHidCoordEntry GHidCoordEntry
typedef struct _GHidCoordEntryClass GHidCoordEntryClass

Enumerations

enum  ce_step_size { CE_TINY, CE_SMALL, CE_MEDIUM, CE_LARGE }

Functions

GType ghid_coord_entry_get_type (void)
GtkWidget * ghid_coord_entry_new (Coord min_val, Coord max_val, Coord value, const Unit *unit, enum ce_step_size step_size)
 Create a new GHidCoordEntry.
void ghid_coord_entry_add_entry (GHidCoordEntry *ce, const gchar *name, const gchar *desc)
gchar * ghid_coord_entry_get_last_command (GHidCoordEntry *ce)
Coord ghid_coord_entry_get_value (GHidCoordEntry *ce)
 Gets a GHidCoordEntry's value, in pcb coords.
void ghid_coord_entry_set_value (GHidCoordEntry *ce, Coord val)
 Sets a GHidCoordEntry's value, in pcb coords.

Define Documentation

#define GHID_COORD_ENTRY (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_COORD_ENTRY_TYPE, GHidCoordEntry))
#define GHID_COORD_ENTRY_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GHID_COORD_ENTRY_TYPE, GHidCoordEntryClass))

Definition at line 15 of file ghid-coord-entry.h.

#define GHID_COORD_ENTRY_TYPE   (ghid_coord_entry_get_type ())

Definition at line 13 of file ghid-coord-entry.h.

Referenced by ghid_coord_entry_new().

#define IS_GHID_COORD_ENTRY (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_COORD_ENTRY_TYPE))

Definition at line 16 of file ghid-coord-entry.h.

#define IS_GHID_COORD_ENTRY_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GHID_COORD_ENTRY_TYPE))

Definition at line 17 of file ghid-coord-entry.h.


Typedef Documentation

Definition at line 19 of file ghid-coord-entry.h.

Definition at line 20 of file ghid-coord-entry.h.


Enumeration Type Documentation

Enumerator:
CE_TINY 
CE_SMALL 
CE_MEDIUM 
CE_LARGE 

Definition at line 23 of file ghid-coord-entry.h.


Function Documentation

void ghid_coord_entry_add_entry ( GHidCoordEntry ce,
const gchar *  name,
const gchar *  desc 
)
gchar* ghid_coord_entry_get_last_command ( GHidCoordEntry ce)
GType ghid_coord_entry_get_type ( void  )

Definition at line 211 of file ghid-coord-entry.c.

References ghid_coord_entry_class_init(), and ghid_coord_entry_init().

Here is the call graph for this function:

Coord ghid_coord_entry_get_value ( GHidCoordEntry ce)

Gets a GHidCoordEntry's value, in pcb coords.

Definition at line 300 of file ghid-coord-entry.c.

References _GHidCoordEntry::value.

Referenced by coord_entry_cb(), ghid_route_style_selector_edit_dialog(), and increment_spin_button_cb().

GtkWidget* ghid_coord_entry_new ( Coord  min_val,
Coord  max_val,
Coord  value,
const Unit unit,
enum ce_step_size  step_size 
)

Create a new GHidCoordEntry.

Parameters:
[in]min_valThe minimum allowed value, in pcb coords
[in]max_valThe maximum allowed value, in pcb coords
[in]valueThe default value, in pcb coords
[in]unitThe default unit
[in]step_sizeHow large the default increments should be
Returns:
a freshly-allocated GHidCoordEntry

Definition at line 250 of file ghid-coord-entry.c.

References CE_LARGE, CE_MEDIUM, CE_SMALL, CE_TINY, coord_to_unit(), unit::default_prec, FALSE, GHID_COORD_ENTRY_TYPE, _GHidCoordEntry::max_value, _GHidCoordEntry::min_value, unit::step_huge, unit::step_large, unit::step_medium, _GHidCoordEntry::step_size, unit::step_small, unit::step_tiny, unit::suffix, unit, _GHidCoordEntry::unit, and _GHidCoordEntry::value.

Referenced by _table_attach(), ghid_attribute_dialog(), ghid_coord_entry(), and ghid_table_coord_entry().

Here is the call graph for this function:

void ghid_coord_entry_set_value ( GHidCoordEntry ce,
Coord  val 
)

Sets a GHidCoordEntry's value, in pcb coords.

Definition at line 307 of file ghid-coord-entry.c.

References coord_to_unit(), and _GHidCoordEntry::unit.

Referenced by dialog_style_changed_cb().

Here is the call graph for this function: