pcb 4.1.1
An interactive printed circuit board layout editor.

gui-utils.c File Reference

#include "gui.h"
#include <gdk/gdkkeysyms.h>
Include dependency graph for gui-utils.c:

Go to the source code of this file.

Functions

gboolean dup_string (gchar **dst, const gchar *src)
void free_glist_and_data (GList **list_head)
gboolean ghid_is_modifier_key_sym (gint ksym)
ModifierKeysState ghid_modifier_keys_state (GdkModifierType *state)
ButtonState ghid_button_state (GdkModifierType *state)
void ghid_draw_area_update (GHidPort *port, GdkRectangle *rect)
gchar * ghid_get_color_name (GdkColor *color)
void ghid_map_color_string (char *color_string, GdkColor *color)
gchar * ghid_entry_get_text (GtkWidget *entry)
void ghid_check_button_connected (GtkWidget *box, GtkWidget **button, gboolean active, gboolean pack_start, gboolean expand, gboolean fill, gint pad, void(*cb_func)(GtkToggleButton *, gpointer), gpointer data, gchar *string)
void ghid_button_connected (GtkWidget *box, GtkWidget **button, gboolean pack_start, gboolean expand, gboolean fill, gint pad, void(*cb_func)(gpointer), gpointer data, gchar *string)
void ghid_coord_entry (GtkWidget *box, GtkWidget **coord_entry, Coord value, Coord low, Coord high, enum ce_step_size step_size, gint width, void(*cb_func)(GHidCoordEntry *, gpointer), gpointer data, gboolean right_align, gchar *string)
void ghid_spin_button (GtkWidget *box, GtkWidget **spin_button, gfloat value, gfloat low, gfloat high, gfloat step0, gfloat step1, gint digits, gint width, void(*cb_func)(GtkSpinButton *, gpointer), gpointer data, gboolean right_align, gchar *string)
void ghid_table_coord_entry (GtkWidget *table, gint row, gint column, GtkWidget **coord_entry, Coord value, Coord low, Coord high, enum ce_step_size step_size, gint width, void(*cb_func)(GHidCoordEntry *, gpointer), gpointer data, gboolean right_align, gchar *string)
void ghid_table_spin_button (GtkWidget *table, gint row, gint column, GtkWidget **spin_button, gfloat value, gfloat low, gfloat high, gfloat step0, gfloat step1, gint digits, gint width, void(*cb_func)(GtkSpinButton *, gpointer), gpointer data, gboolean right_align, gchar *string)
void ghid_range_control (GtkWidget *box, GtkWidget **scale_res, gboolean horizontal, GtkPositionType pos, gboolean set_draw_value, gint digits, gboolean pack_start, gboolean expand, gboolean fill, guint pad, gfloat value, gfloat low, gfloat high, gfloat step0, gfloat step1, void(*cb_func)(), gpointer data)
GtkWidget * ghid_scrolled_vbox (GtkWidget *box, GtkWidget **scr, GtkPolicyType h_policy, GtkPolicyType v_policy)
GtkWidget * ghid_framed_vbox (GtkWidget *box, gchar *label, gint frame_border_width, gboolean frame_expand, gint vbox_pad, gint vbox_border_width)
GtkWidget * ghid_framed_vbox_end (GtkWidget *box, gchar *label, gint frame_border_width, gboolean frame_expand, gint vbox_pad, gint vbox_border_width)
GtkWidget * ghid_category_vbox (GtkWidget *box, const gchar *category_header, gint header_pad, gint box_pad, gboolean pack_start, gboolean bottom_pad)
GtkTreeSelection * ghid_scrolled_selection (GtkTreeView *treeview, GtkWidget *box, GtkSelectionMode s_mode, GtkPolicyType h_policy, GtkPolicyType v_policy, void(*func_cb)(GtkTreeSelection *, gpointer), gpointer data)
GtkWidget * ghid_notebook_page (GtkWidget *tabs, const char *name, gint pad, gint border)
GtkWidget * ghid_framed_notebook_page (GtkWidget *tabs, char *name, gint border, gint frame_border, gint vbox_pad, gint vbox_border)
void ghid_dialog_report (gchar *title, gchar *message)
void ghid_label_set_markup (GtkWidget *label, const gchar *text)
static void text_view_append (GtkWidget *view, gchar *s)
void ghid_text_view_append (GtkWidget *view, gchar *string)
void ghid_text_view_append_strings (GtkWidget *view, gchar **string, gint n_strings)
GtkWidget * ghid_scrolled_text_view (GtkWidget *box, GtkWidget **scr, GtkPolicyType h_policy, GtkPolicyType v_policy)

Function Documentation

void free_glist_and_data ( GList **  list_head)

Definition at line 58 of file gui-utils.c.

void ghid_button_connected ( GtkWidget *  box,
GtkWidget **  button,
gboolean  pack_start,
gboolean  expand,
gboolean  fill,
gint  pad,
void(*)(gpointer)  cb_func,
gpointer  data,
gchar *  string 
)

Definition at line 233 of file gui-utils.c.

Referenced by config_colors_tab_create().

ButtonState ghid_button_state ( GdkModifierType *  state)
GtkWidget* ghid_category_vbox ( GtkWidget *  box,
const gchar *  category_header,
gint  header_pad,
gint  box_pad,
gboolean  pack_start,
gboolean  bottom_pad 
)
void ghid_check_button_connected ( GtkWidget *  box,
GtkWidget **  button,
gboolean  active,
gboolean  pack_start,
gboolean  expand,
gboolean  fill,
gint  pad,
void(*)(GtkToggleButton *, gpointer)  cb_func,
gpointer  data,
gchar *  string 
)
void ghid_coord_entry ( GtkWidget *  box,
GtkWidget **  coord_entry,
Coord  value,
Coord  low,
Coord  high,
enum ce_step_size  step_size,
gint  width,
void(*)(GHidCoordEntry *, gpointer)  cb_func,
gpointer  data,
gboolean  right_align,
gchar *  string 
)

Definition at line 255 of file gui-utils.c.

References FALSE, GHID_COORD_ENTRY, ghid_coord_entry_new(), SettingType::grid_unit, Settings, and TRUE.

Here is the call graph for this function:

void ghid_dialog_report ( gchar *  title,
gchar *  message 
)

Definition at line 647 of file gui-utils.c.

References FALSE, ghid_port, ghid_scrolled_vbox(), s, and GHidPort::top_window.

Referenced by ghid_report_dialog().

Here is the call graph for this function:

void ghid_draw_area_update ( GHidPort port,
GdkRectangle *  rect 
)
gchar* ghid_entry_get_text ( GtkWidget *  entry)
GtkWidget* ghid_framed_notebook_page ( GtkWidget *  tabs,
char *  name,
gint  border,
gint  frame_border,
gint  vbox_pad,
gint  vbox_border 
)

Definition at line 635 of file gui-utils.c.

References ghid_framed_vbox(), ghid_notebook_page(), and TRUE.

Here is the call graph for this function:

GtkWidget* ghid_framed_vbox ( GtkWidget *  box,
gchar *  label,
gint  frame_border_width,
gboolean  frame_expand,
gint  vbox_pad,
gint  vbox_border_width 
)

Definition at line 521 of file gui-utils.c.

References FALSE.

Referenced by ghid_dialog_confirm_all(), and ghid_framed_notebook_page().

GtkWidget* ghid_framed_vbox_end ( GtkWidget *  box,
gchar *  label,
gint  frame_border_width,
gboolean  frame_expand,
gint  vbox_pad,
gint  vbox_border_width 
)

Definition at line 538 of file gui-utils.c.

References FALSE.

gchar* ghid_get_color_name ( GdkColor *  color)

Definition at line 159 of file gui-utils.c.

Referenced by config_color_set_cb().

gboolean ghid_is_modifier_key_sym ( gint  ksym)

Definition at line 73 of file gui-utils.c.

References FALSE, and TRUE.

Referenced by ghid_port_key_press_cb(), ghid_port_key_release_cb(), and loop_key_press_cb().

void ghid_label_set_markup ( GtkWidget *  label,
const gchar *  text 
)
void ghid_map_color_string ( char *  color_string,
GdkColor *  color 
)
GtkWidget* ghid_notebook_page ( GtkWidget *  tabs,
const char *  name,
gint  pad,
gint  border 
)

Definition at line 620 of file gui-utils.c.

References FALSE.

Referenced by config_layers_tab_create(), and ghid_framed_notebook_page().

void ghid_range_control ( GtkWidget *  box,
GtkWidget **  scale_res,
gboolean  horizontal,
GtkPositionType  pos,
gboolean  set_draw_value,
gint  digits,
gboolean  pack_start,
gboolean  expand,
gboolean  fill,
guint  pad,
gfloat  value,
gfloat  low,
gfloat  high,
gfloat  step0,
gfloat  step1,
void(*)()  cb_func,
gpointer  data 
)

Definition at line 458 of file gui-utils.c.

References scale.

GtkTreeSelection* ghid_scrolled_selection ( GtkTreeView *  treeview,
GtkWidget *  box,
GtkSelectionMode  s_mode,
GtkPolicyType  h_policy,
GtkPolicyType  v_policy,
void(*)(GtkTreeSelection *, gpointer)  func_cb,
gpointer  data 
)

Definition at line 595 of file gui-utils.c.

References TRUE.

Referenced by ghid_netlist_window_create().

GtkWidget* ghid_scrolled_text_view ( GtkWidget *  box,
GtkWidget **  scr,
GtkPolicyType  h_policy,
GtkPolicyType  v_policy 
)
GtkWidget* ghid_scrolled_vbox ( GtkWidget *  box,
GtkWidget **  scr,
GtkPolicyType  h_policy,
GtkPolicyType  v_policy 
)

Definition at line 499 of file gui-utils.c.

References FALSE, and TRUE.

Referenced by config_colors_tab_create(), ghid_build_pcb_top_window(), and ghid_dialog_report().

void ghid_spin_button ( GtkWidget *  box,
GtkWidget **  spin_button,
gfloat  value,
gfloat  low,
gfloat  high,
gfloat  step0,
gfloat  step1,
gint  digits,
gint  width,
void(*)(GtkSpinButton *, gpointer)  cb_func,
gpointer  data,
gboolean  right_align,
gchar *  string 
)

Definition at line 300 of file gui-utils.c.

References FALSE, and TRUE.

Referenced by config_general_tab_create(), and ghid_attribute_dialog().

void ghid_table_coord_entry ( GtkWidget *  table,
gint  row,
gint  column,
GtkWidget **  coord_entry,
Coord  value,
Coord  low,
Coord  high,
enum ce_step_size  step_size,
gint  width,
void(*)(GHidCoordEntry *, gpointer)  cb_func,
gpointer  data,
gboolean  right_align,
gchar *  string 
)

Definition at line 349 of file gui-utils.c.

References GHID_COORD_ENTRY, ghid_coord_entry_new(), SettingType::grid_unit, and Settings.

Referenced by config_sizes_tab_create().

Here is the call graph for this function:

void ghid_table_spin_button ( GtkWidget *  table,
gint  row,
gint  column,
GtkWidget **  spin_button,
gfloat  value,
gfloat  low,
gfloat  high,
gfloat  step0,
gfloat  step1,
gint  digits,
gint  width,
void(*)(GtkSpinButton *, gpointer)  cb_func,
gpointer  data,
gboolean  right_align,
gchar *  string 
)

Definition at line 401 of file gui-utils.c.

References TRUE.

Referenced by config_sizes_tab_create().

void ghid_text_view_append ( GtkWidget *  view,
gchar *  string 
)

Definition at line 742 of file gui-utils.c.

References s, and text_view_append().

Referenced by config_layers_tab_create(), ghid_command_window_show(), ghid_keyref_window_show(), and ghid_log_append_string().

Here is the call graph for this function:

void ghid_text_view_append_strings ( GtkWidget *  view,
gchar **  string,
gint  n_strings 
)

Definition at line 768 of file gui-utils.c.

References _, s, and text_view_append().

Here is the call graph for this function:

static void text_view_append ( GtkWidget *  view,
gchar *  s 
) [static]

Definition at line 707 of file gui-utils.c.

References buffer, FALSE, and TRUE.

Referenced by ghid_text_view_append(), and ghid_text_view_append_strings().