pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "gui.h"
#include "hid.h"
#include "../hidint.h"
#include "gtkhid.h"
#include "global.h"
#include "action.h"
#include "change.h"
#include "file.h"
#include "error.h"
#include "draw.h"
#include "misc.h"
#include "pcb-printf.h"
#include "set.h"
Go to the source code of this file.
Data Structures | |
struct | ConfigAttribute |
struct | ConfigColor |
Defines | |
#define | PCB_CONFIG_DIR ".pcb" |
#define | PCB_CONFIG_FILE "preferences" |
#define | PCB_COLORS_DIR "colors" |
#define | INCR_ENTRY(row, name, family, type, msg) |
Enumerations | |
enum | ConfigType { CONFIG_Boolean, CONFIG_Integer, CONFIG_Coord, CONFIG_Real, CONFIG_String, CONFIG_Unused } |
enum | ColorTypes { MISC_COLOR, MISC_SELECTED_COLOR, LAYER_COLOR, LAYER_SELECTED_COLOR } |
enum | { CONFIG_NAME_COLUMN, CONFIG_PAGE_COLUMN, N_CONFIG_COLUMNS } |
Functions | |
int | MoveLayerAction (int argc, char **argv, int x, int y) |
void | save_increments (const Increments *mm, const Increments *mil) |
void | ghid_set_special_colors (HID_Attribute *ha) |
static gboolean | dup_core_string (gchar **dst, const gchar *src) |
static FILE * | config_file_open (gchar *mode) |
static ConfigAttribute * | lookup_config_attribute (gchar *name, gboolean if_null_value) |
void | ghid_config_init (void) |
static gint | parse_option_line (gchar *line, gchar **option_result, gchar **arg_result) |
static gboolean | set_config_attribute (gchar *option, gchar *arg) |
static void | config_file_read (void) |
static void | config_colors_write (gchar *path) |
static gboolean | config_colors_read (gchar *path) |
static gchar * | expand_dir (gchar *dir) |
static void | add_to_paths_list (GList **list, gchar *path_string) |
static void | parse_optionv (gint *argc, gchar ***argv, gboolean from_cmd_line) |
static void | load_rc_file (gchar *path) |
static void | load_rc_files (void) |
void | ghid_config_files_read (gint *argc, gchar ***argv) |
void | ghid_config_files_write (void) |
static void | config_command_window_toggle_cb (GtkToggleButton *button, gpointer data) |
static void | config_compact_horizontal_toggle_cb (GtkToggleButton *button, gpointer data) |
static void | config_compact_vertical_toggle_cb (GtkToggleButton *button, gpointer data) |
static void | config_general_toggle_cb (GtkToggleButton *button, void *setting) |
static void | config_backup_spin_button_cb (GtkSpinButton *spin_button, gpointer data) |
static void | config_history_spin_button_cb (GtkSpinButton *spin_button, gpointer data) |
static void | config_general_tab_create (GtkWidget *tab_vbox) |
static void | config_general_apply (void) |
static void | config_sizes_apply (void) |
static void | text_spin_button_cb (GtkSpinButton *spin, void *dst) |
static void | coord_entry_cb (GHidCoordEntry *ce, void *dst) |
static void | config_sizes_tab_create (GtkWidget *tab_vbox) |
static void | increment_spin_button_cb (GHidCoordEntry *ce, void *dst) |
static void | config_increments_tab_create (GtkWidget *tab_vbox) |
static void | config_library_apply (void) |
static void | config_library_tab_create (GtkWidget *tab_vbox) |
static void | config_layer_groups_radio_button_cb (GtkToggleButton *button, gpointer data) |
static gchar * | make_layer_group_string (LayerGroupType *lg) |
static void | config_layers_apply (void) |
static void | config_layer_group_button_state_update (void) |
static void | layer_name_entry_cb (GtkWidget *entry, gpointer data) |
void | ghid_config_groups_changed (void) |
static void | edit_layer_button_cb (GtkWidget *widget, gchar *data) |
static void | config_layers_tab_create (GtkWidget *tab_vbox) |
void | ghid_config_layer_name_update (gchar *name, gint layer) |
static void | config_colors_tab_create (GtkWidget *tab_vbox) |
static void | config_color_file_set_label (void) |
static void | config_color_defaults_cb (gpointer data) |
static void | config_color_load_cb (gpointer data) |
static void | config_color_save_cb (gpointer data) |
static void | config_color_set_cb (GtkWidget *button, ConfigColor *cc) |
static void | config_color_button_create (GtkWidget *box, ConfigColor *cc) |
static GtkWidget * | config_page_create (GtkTreeStore *tree, GtkTreeIter *iter, GtkNotebook *notebook) |
void | ghid_config_handle_units_changed (void) |
void | ghid_config_text_scale_update (void) |
static void | config_close_cb (gpointer data) |
static void | config_destroy_cb (gpointer data) |
static void | config_selection_changed_cb (GtkTreeSelection *selection, gpointer data) |
void | ghid_config_window_show (void) |
Variables | |
static GList * | config_color_list |
static GList * | lib_newlib_list |
static gchar * | lib_newlib_config |
static gchar * | board_size_override |
static gchar * | color_file |
static gchar * | config_dir |
static gchar * | color_dir |
static ConfigAttribute | config_attributes [] |
static GtkWidget * | config_window |
static GtkWidget * | config_sizes_vbox |
static GtkWidget * | config_sizes_tab_vbox |
static GtkWidget * | config_text_spin_button |
static GtkWidget * | use_board_size_default_button |
static GtkWidget * | use_drc_sizes_default_button |
static GtkWidget * | use_increments_default_button |
static Coord | new_board_width |
static Coord | new_board_height |
static GtkWidget * | config_increments_vbox |
static GtkWidget * | config_increments_tab_vbox |
static GtkWidget * | library_newlib_entry |
static GtkWidget * | config_groups_table |
static GtkWidget * | config_groups_vbox |
static GtkWidget * | config_groups_window |
static GtkWidget * | layer_entry [MAX_LAYER] |
static GtkWidget * | group_button [MAX_ALL_LAYER][MAX_GROUP] |
static gint | config_layer_group [MAX_ALL_LAYER] |
static LayerGroupType | layer_groups |
static LayerGroupType * | lg_monitor |
static gboolean | groups_modified |
static gboolean | groups_holdoff |
static gboolean | layers_applying |
static gchar * | layer_info_text [] |
static GtkWidget * | config_colors_vbox |
static GtkWidget * | config_colors_tab_vbox |
static GtkWidget * | config_colors_save_button |
static GtkWidget * | config_color_file_label |
static GtkWidget * | config_color_warn_label |
static gboolean | config_colors_modified |
static GtkNotebook * | config_notebook |
#define INCR_ENTRY | ( | row, | |
name, | |||
family, | |||
type, | |||
msg | |||
) |
gtk_table_attach_defaults (GTK_TABLE (table), \ gtk_label_new (name), \ 0, 1, row, row + 1); \ ghid_table_coord_entry (table, row, 1, NULL, \ incr_##family->type, \ incr_##family->type##_min, \ incr_##family->type##_max, \ CE_SMALL, 0, increment_spin_button_cb, \ &incr_##family->type, FALSE, \ msg)
Referenced by config_increments_tab_create().
#define PCB_COLORS_DIR "colors" |
Definition at line 109 of file gui-config.c.
Referenced by config_file_open().
#define PCB_CONFIG_DIR ".pcb" |
Definition at line 107 of file gui-config.c.
Referenced by config_file_open().
#define PCB_CONFIG_FILE "preferences" |
Definition at line 108 of file gui-config.c.
Referenced by config_file_open().
anonymous enum |
Definition at line 2054 of file gui-config.c.
enum ColorTypes |
Definition at line 80 of file gui-config.c.
enum ConfigType |
Definition at line 61 of file gui-config.c.
static void add_to_paths_list | ( | GList ** | list, |
gchar * | path_string | ||
) | [static] |
Definition at line 570 of file gui-config.c.
References expand_dir().
Referenced by ghid_config_files_read().
static void config_backup_spin_button_cb | ( | GtkSpinButton * | spin_button, |
gpointer | data | ||
) | [static] |
Definition at line 904 of file gui-config.c.
References SettingType::BackupInterval, GhidGui::config_modified, EnableAutosave(), ghidgui, Settings, and TRUE.
Referenced by config_general_tab_create().
static void config_close_cb | ( | gpointer | data | ) | [static] |
Definition at line 2110 of file gui-config.c.
References config_general_apply(), config_groups_table, config_groups_vbox, config_groups_window, config_increments_vbox, config_layers_apply(), config_library_apply(), config_sizes_apply(), config_sizes_vbox, and config_window.
Referenced by ghid_config_window_show().
static void config_color_button_create | ( | GtkWidget * | box, |
ConfigColor * | cc | ||
) | [static] |
Definition at line 1924 of file gui-config.c.
References _, ConfigColor::attributes, ConfigColor::color, ConfigColor::color_is_mapped, config_color_set_cb(), FALSE, ghid_map_color_string(), HID_Attribute::name, TRUE, and HID_Attribute::value.
Referenced by config_colors_tab_create().
static void config_color_defaults_cb | ( | gpointer | data | ) | [static] |
Definition at line 1809 of file gui-config.c.
References ConfigColor::attributes, color_file, ConfigColor::color_is_mapped, config_color_file_set_label(), config_color_list, config_color_warn_label, config_colors_modified, config_colors_save_button, config_colors_tab_create(), config_colors_tab_vbox, config_colors_vbox, GhidGui::config_modified, HID_Attribute::default_val, dup_core_string(), dup_string(), FALSE, ghid_invalidate_all(), ghid_layer_buttons_color_update(), ghid_set_special_colors(), ghidgui, HID_Attr_Val::str_value, TRUE, and HID_Attribute::value.
Referenced by config_colors_tab_create().
static void config_color_file_set_label | ( | void | ) | [static] |
Definition at line 1793 of file gui-config.c.
References _, color_file, and config_color_file_label.
Referenced by config_color_defaults_cb(), config_color_load_cb(), config_color_save_cb(), and config_colors_tab_create().
static void config_color_load_cb | ( | gpointer | data | ) | [static] |
Definition at line 1843 of file gui-config.c.
References _, color_dir, color_file, config_color_file_set_label(), config_color_warn_label, config_colors_modified, config_colors_read(), config_colors_save_button, config_colors_tab_create(), config_colors_tab_vbox, config_colors_vbox, GhidGui::config_modified, dup_string(), FALSE, ghid_dialog_file_select_open(), ghid_invalidate_all(), ghid_layer_buttons_color_update(), ghidgui, and TRUE.
Referenced by config_colors_tab_create().
static void config_color_save_cb | ( | gpointer | data | ) | [static] |
Definition at line 1872 of file gui-config.c.
References _, color_dir, color_file, config_color_file_set_label(), config_color_warn_label, config_colors_modified, config_colors_save_button, config_colors_write(), GhidGui::config_modified, dup_string(), FALSE, ghid_dialog_file_select_save(), ghid_dialog_message(), ghidgui, and TRUE.
Referenced by config_colors_tab_create().
static void config_color_set_cb | ( | GtkWidget * | button, |
ConfigColor * | cc | ||
) | [static] |
Definition at line 1902 of file gui-config.c.
References ConfigColor::attributes, ConfigColor::color, config_color_warn_label, config_colors_modified, config_colors_save_button, ghid_get_color_name(), ghid_invalidate_all(), ghid_layer_buttons_color_update(), ghid_map_color_string(), ghid_set_special_colors(), TRUE, and HID_Attribute::value.
Referenced by config_color_button_create().
static gboolean config_colors_read | ( | gchar * | path | ) | [static] |
Definition at line 517 of file gui-config.c.
References ConfigColor::attributes, ConfigColor::color_is_mapped, config_color_list, f, FALSE, ghid_set_special_colors(), HID_Attribute::name, s, TRUE, and HID_Attribute::value.
Referenced by config_color_load_cb(), and ghid_config_files_read().
static void config_colors_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 1950 of file gui-config.c.
References _, config_color_button_create(), config_color_defaults_cb(), config_color_file_label, config_color_file_set_label(), config_color_list, config_color_load_cb(), config_color_save_cb(), config_color_warn_label, config_colors_modified, config_colors_save_button, config_colors_tab_vbox, config_colors_vbox, FALSE, ghid_button_connected(), ghid_category_vbox(), ghid_scrolled_vbox(), LAYER_COLOR, LAYER_SELECTED_COLOR, MISC_COLOR, MISC_SELECTED_COLOR, TRUE, and ConfigColor::type.
Referenced by config_color_defaults_cb(), config_color_load_cb(), and ghid_config_window_show().
static void config_colors_write | ( | gchar * | path | ) | [static] |
Definition at line 498 of file gui-config.c.
References ConfigColor::attributes, config_color_list, f, HID_Attribute::name, and HID_Attribute::value.
Referenced by config_color_save_cb().
static void config_command_window_toggle_cb | ( | GtkToggleButton * | button, |
gpointer | data | ||
) | [static] |
Definition at line 853 of file gui-config.c.
References GhidGui::command_entry_status_line_active, FALSE, ghid_command_use_command_window_sync(), ghidgui, TRUE, and GhidGui::use_command_window.
Referenced by config_general_tab_create().
static void config_compact_horizontal_toggle_cb | ( | GtkToggleButton * | button, |
gpointer | data | ||
) | [static] |
Definition at line 877 of file gui-config.c.
References GhidGui::compact_horizontal, GhidGui::config_modified, ghid_set_status_line_label(), ghidgui, and TRUE.
Referenced by config_general_tab_create().
static void config_compact_vertical_toggle_cb | ( | GtkToggleButton * | button, |
gpointer | data | ||
) | [static] |
Definition at line 887 of file gui-config.c.
References GhidGui::compact_vertical, GhidGui::config_modified, ghid_pack_mode_buttons(), ghidgui, and TRUE.
Referenced by config_general_tab_create().
static void config_destroy_cb | ( | gpointer | data | ) | [static] |
Definition at line 2131 of file gui-config.c.
References config_groups_table, config_groups_vbox, config_groups_window, config_increments_vbox, config_sizes_vbox, and config_window.
Referenced by ghid_config_window_show().
static FILE* config_file_open | ( | gchar * | mode | ) | [static] |
Definition at line 196 of file gui-config.c.
References color_dir, color_file, config_dir, dup_string(), f, homedir, MKDIR, PCB_COLORS_DIR, PCB_CONFIG_DIR, and PCB_CONFIG_FILE.
Referenced by config_file_read(), and ghid_config_files_write().
static void config_file_read | ( | void | ) | [static] |
Definition at line 475 of file gui-config.c.
References config_file_open(), f, getline(), n, parse_option_line(), and set_config_attribute().
Referenced by ghid_config_files_read().
static void config_general_apply | ( | void | ) | [static] |
Definition at line 966 of file gui-config.c.
References ghid_config_files_write().
Referenced by config_close_cb().
static void config_general_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 919 of file gui-config.c.
References _, SettingType::BackupInterval, GhidGui::compact_horizontal, GhidGui::compact_vertical, config_backup_spin_button_cb(), config_command_window_toggle_cb(), config_compact_horizontal_toggle_cb(), config_compact_vertical_toggle_cb(), config_general_toggle_cb(), config_history_spin_button_cb(), FALSE, ghid_category_vbox(), ghid_check_button_connected(), ghid_spin_button(), ghidgui, GhidGui::history_size, SettingType::SaveInTMP, SettingType::SaveMetricOnly, Settings, TRUE, and GhidGui::use_command_window.
Referenced by ghid_config_window_show().
static void config_general_toggle_cb | ( | GtkToggleButton * | button, |
void * | setting | ||
) | [static] |
Definition at line 897 of file gui-config.c.
References GhidGui::config_modified, ghidgui, and TRUE.
Referenced by config_general_tab_create().
static void config_history_spin_button_cb | ( | GtkSpinButton * | spin_button, |
gpointer | data | ||
) | [static] |
Definition at line 912 of file gui-config.c.
References GhidGui::config_modified, ghidgui, GhidGui::history_size, and TRUE.
Referenced by config_general_tab_create().
static void config_increments_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 1173 of file gui-config.c.
References _, config_increments_tab_vbox, config_increments_vbox, FALSE, get_increments_struct(), ghid_category_vbox(), ghid_check_button_connected(), IMPERIAL, INCR_ENTRY, line, METRIC, TRUE, and use_increments_default_button.
Referenced by ghid_config_handle_units_changed(), and ghid_config_window_show().
static void config_layer_group_button_state_update | ( | void | ) | [static] |
Definition at line 1507 of file gui-config.c.
References config_layer_group, LayerGroupType::Entries, FALSE, group_button, groups_holdoff, max_group, LayerGroupType::Number, and TRUE.
Referenced by ghid_config_groups_changed(), and ghid_config_layer_name_update().
static void config_layer_groups_radio_button_cb | ( | GtkToggleButton * | button, |
gpointer | data | ||
) | [static] |
Definition at line 1370 of file gui-config.c.
References config_layer_group, GhidGui::config_modified, ghidgui, groups_holdoff, groups_modified, layer, and TRUE.
Referenced by ghid_config_groups_changed().
static void config_layers_apply | ( | void | ) | [static] |
Definition at line 1417 of file gui-config.c.
References _, bottom_group, bottom_silk_layer, config_layer_group, GhidGui::config_modified, PCBType::Data, SettingType::DefaultLayerName, dup_core_string(), LayerGroupType::Entries, FALSE, ghid_entry_get_text(), ghid_invalidate_all(), ghid_layer_buttons_update(), ghidgui, SettingType::Groups, groups_modified, DataType::Layer, layer, layer_entry, layer_groups, SettingType::LayerGroups, PCBType::LayerGroups, layers_applying, make_layer_group_string(), max_copper_layer, max_group, Message(), LayerType::Name, LayerGroupType::Number, ParseGroupString(), PCB, s, Settings, SILK_LAYER, top_group, top_silk_layer, and TRUE.
Referenced by config_close_cb().
static void config_layers_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 1686 of file gui-config.c.
References _, C_, config_groups_vbox, edit_layer_button_cb(), FALSE, ghid_category_vbox(), ghid_check_button_connected(), ghid_config_groups_changed(), ghid_notebook_page(), ghid_scrolled_text_view(), ghid_text_view_append(), layer_info_text, and TRUE.
Referenced by ghid_config_window_show().
static void config_library_apply | ( | void | ) | [static] |
Definition at line 1260 of file gui-config.c.
References GhidGui::config_modified, dup_string(), ghid_entry_get_text(), ghidgui, lib_newlib_config, library_newlib_entry, and TRUE.
Referenced by config_close_cb().
static void config_library_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 1268 of file gui-config.c.
References _, FALSE, ghid_category_vbox(), lib_newlib_config, library_newlib_entry, and TRUE.
Referenced by ghid_config_window_show().
static GtkWidget* config_page_create | ( | GtkTreeStore * | tree, |
GtkTreeIter * | iter, | ||
GtkNotebook * | notebook | ||
) | [static] |
Definition at line 2064 of file gui-config.c.
References CONFIG_PAGE_COLUMN, and FALSE.
Referenced by ghid_config_window_show().
static void config_selection_changed_cb | ( | GtkTreeSelection * | selection, |
gpointer | data | ||
) | [static] |
Definition at line 2142 of file gui-config.c.
References config_notebook, and CONFIG_PAGE_COLUMN.
Referenced by ghid_config_window_show().
static void config_sizes_apply | ( | void | ) | [static] |
Definition at line 986 of file gui-config.c.
References PCBType::Bloat, SettingType::Bloat, ChangePCBSize(), GhidGui::config_modified, get_increments_struct(), ghidgui, IMPERIAL, PCBType::IsleArea, SettingType::IsleArea, PCBType::MaxHeight, SettingType::MaxHeight, PCBType::MaxWidth, SettingType::MaxWidth, METRIC, PCBType::minDrill, SettingType::minDrill, PCBType::minRing, SettingType::minRing, PCBType::minSlk, SettingType::minSlk, PCBType::minWid, SettingType::minWid, new_board_height, new_board_width, PCB, save_increments(), Settings, PCBType::Shrink, SettingType::Shrink, TRUE, use_board_size_default_button, use_drc_sizes_default_button, and use_increments_default_button.
Referenced by config_close_cb().
static void config_sizes_tab_create | ( | GtkWidget * | tab_vbox | ) | [static] |
Definition at line 1045 of file gui-config.c.
References _, PCBType::Bloat, CE_LARGE, CE_SMALL, config_sizes_tab_vbox, config_sizes_vbox, config_text_spin_button, coord_entry_cb(), FALSE, ghid_category_vbox(), ghid_check_button_connected(), ghid_table_coord_entry(), ghid_table_spin_button(), PCBType::MaxHeight, PCBType::MaxWidth, PCBType::minDrill, PCBType::minRing, PCBType::minSlk, PCBType::minWid, new_board_height, new_board_width, PCB, Settings, PCBType::Shrink, text_spin_button_cb(), SettingType::TextScale, TRUE, use_board_size_default_button, and use_drc_sizes_default_button.
Referenced by ghid_config_handle_units_changed(), and ghid_config_window_show().
static void coord_entry_cb | ( | GHidCoordEntry * | ce, |
void * | dst | ||
) | [static] |
Definition at line 1038 of file gui-config.c.
References GhidGui::config_modified, ghid_coord_entry_get_value(), ghidgui, and TRUE.
Referenced by config_sizes_tab_create().
static gboolean dup_core_string | ( | gchar ** | dst, |
const gchar * | src | ||
) | [static] |
Definition at line 181 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_layers_apply(), and layer_name_entry_cb().
static void edit_layer_button_cb | ( | GtkWidget * | widget, |
gchar * | data | ||
) | [static] |
Definition at line 1673 of file gui-config.c.
References MoveLayerAction(), PCB, PCBType::RatDraw, and PCBType::SilkActive.
Referenced by config_layers_tab_create().
static gchar* expand_dir | ( | gchar * | dir | ) | [static] |
Definition at line 558 of file gui-config.c.
References s.
Referenced by add_to_paths_list(), CreateEdge(), and ghid_config_files_read().
void ghid_config_files_read | ( | gint * | argc, |
gchar *** | argv | ||
) |
Definition at line 762 of file gui-config.c.
References _ghidgui, add_to_paths_list(), board_size_override, color_file, config_colors_read(), config_file_read(), expand_dir(), ghid_config_init(), ghidgui, lib_newlib_config, lib_newlib_list, SettingType::LibraryTree, load_rc_files(), SettingType::MaxHeight, SettingType::MaxWidth, parse_optionv(), Settings, TO_PCB_UNITS, and TRUE.
Referenced by ghid_parse_arguments().
void ghid_config_files_write | ( | void | ) |
Definition at line 799 of file gui-config.c.
References CONFIG_Boolean, CONFIG_Coord, config_file_open(), CONFIG_Integer, GhidGui::config_modified, CONFIG_Real, CONFIG_String, f, FALSE, ghidgui, ConfigAttribute::name, pcb_fprintf(), ConfigAttribute::type, and ConfigAttribute::value.
Referenced by config_general_apply(), delete_chart_cb(), ghid_do_export(), and route_styles_edited_cb().
void ghid_config_groups_changed | ( | void | ) |
Definition at line 1541 of file gui-config.c.
References _, bottom_silk_layer, config_groups_table, config_groups_vbox, config_groups_window, config_layer_group_button_state_update(), config_layer_groups_radio_button_cb(), PCBType::Data, FALSE, group_button, DataType::Layer, layer, layer_entry, layer_name_entry_cb(), PCBType::LayerGroups, max_copper_layer, max_group, LayerType::Name, PCB, SILK_LAYER, top_silk_layer, TRUE, and UNKNOWN.
Referenced by config_layers_tab_create(), and LayersChanged().
void ghid_config_handle_units_changed | ( | void | ) |
Definition at line 2078 of file gui-config.c.
References config_increments_tab_create(), config_increments_tab_vbox, config_increments_vbox, GhidGui::config_modified, config_sizes_tab_create(), config_sizes_tab_vbox, config_sizes_vbox, ghid_set_cursor_position_labels(), ghidgui, SettingType::grid_unit, GhidGui::grid_units_label, unit::in_suffix, pcb_g_strdup_printf(), Settings, and TRUE.
Referenced by ghid_sync_with_new_layout(), and SetUnits().
void ghid_config_init | ( | void | ) |
Definition at line 270 of file gui-config.c.
References ConfigColor::attributes, HID_AttrNode::attributes, color_file, CONFIG_Boolean, config_color_list, CONFIG_Coord, CONFIG_Integer, CONFIG_Real, CONFIG_String, CONFIG_Unused, HID_Attr_Val::coord_value, HID_Attribute::default_val, dup_string(), ghidgui, hid_attr_nodes, HID_Boolean, HID_Coord, HID_Enum, HID_Integer, HID_Label, HID_Mixed, HID_Path, HID_Real, HID_String, HID_Unit, GhidGui::history_size, HID_Attr_Val::int_value, LAYER_COLOR, LAYER_SELECTED_COLOR, len, lookup_config_attribute(), MISC_COLOR, MISC_SELECTED_COLOR, HID_AttrNode::n, GhidGui::n_mode_button_columns, HID_Attribute::name, HID_AttrNode::next, HID_Attr_Val::real_value, GhidGui::small_label_markup, HID_Attr_Val::str_value, TRUE, ConfigColor::type, HID_Attribute::type, ConfigAttribute::type, ConfigAttribute::value, and HID_Attribute::value.
Referenced by ghid_config_files_read().
void ghid_config_layer_name_update | ( | gchar * | name, |
gint | layer | ||
) |
Definition at line 1763 of file gui-config.c.
References config_layer_group_button_state_update(), config_window, FALSE, groups_modified, layer_entry, PCBType::LayerGroups, layers_applying, and PCB.
void ghid_config_text_scale_update | ( | void | ) |
Definition at line 2102 of file gui-config.c.
References config_text_spin_button, config_window, Settings, and SettingType::TextScale.
void ghid_config_window_show | ( | void | ) |
Definition at line 2155 of file gui-config.c.
References _, config_close_cb(), config_colors_tab_create(), config_destroy_cb(), config_general_tab_create(), config_increments_tab_create(), config_layers_tab_create(), config_library_tab_create(), CONFIG_NAME_COLUMN, config_notebook, config_page_create(), config_selection_changed_cb(), config_sizes_tab_create(), config_window, FALSE, N_CONFIG_COLUMNS, and TRUE.
Referenced by DoWindows().
void ghid_set_special_colors | ( | HID_Attribute * | ha | ) |
Definition at line 386 of file gtkhid-gdk.c.
References GHidPort::bg_color, render_priv::bg_gc, ghid_map_color_string(), gport, GHidPort::grid_color, render_priv::grid_gc, HID_Attribute::name, GHidPort::offlimits_color, render_priv::offlimits_gc, GHidPort::render_priv, set_special_grid_color(), and HID_Attribute::value.
Referenced by config_color_defaults_cb(), config_color_set_cb(), and config_colors_read().
static void increment_spin_button_cb | ( | GHidCoordEntry * | ce, |
void * | dst | ||
) | [static] |
Definition at line 1166 of file gui-config.c.
References GhidGui::config_modified, ghid_coord_entry_get_value(), ghidgui, and TRUE.
static void layer_name_entry_cb | ( | GtkWidget * | entry, |
gpointer | data | ||
) | [static] |
Definition at line 1528 of file gui-config.c.
References PCBType::Data, dup_core_string(), ghid_entry_get_text(), ghid_layer_buttons_update(), DataType::Layer, layer, LayerType::Name, and PCB.
Referenced by ghid_config_groups_changed().
static void load_rc_file | ( | gchar * | path | ) | [static] |
Definition at line 718 of file gui-config.c.
References f, FALSE, parse_option_line(), parse_optionv(), Settings, and SettingType::verbose.
Referenced by load_rc_files().
static void load_rc_files | ( | void | ) | [static] |
Definition at line 742 of file gui-config.c.
References load_rc_file(), and pcblibdir.
Referenced by ghid_config_files_read().
static ConfigAttribute* lookup_config_attribute | ( | gchar * | name, |
gboolean | if_null_value | ||
) | [static] |
Definition at line 252 of file gui-config.c.
References ConfigAttribute::name, and ConfigAttribute::value.
Referenced by ghid_config_init(), and set_config_attribute().
static gchar* make_layer_group_string | ( | LayerGroupType * | lg | ) | [static] |
Definition at line 1386 of file gui-config.c.
References bottom_silk_layer, LayerGroupType::Entries, FALSE, layer, max_group, LayerGroupType::Number, and top_silk_layer.
Referenced by config_layers_apply().
int MoveLayerAction | ( | int | argc, |
char ** | argv, | ||
int | x, | ||
int | y | ||
) |
Referenced by edit_layer_button_cb().
static gint parse_option_line | ( | gchar * | line, |
gchar ** | option_result, | ||
gchar ** | arg_result | ||
) | [static] |
Definition at line 354 of file gui-config.c.
References line, malloc(), and s.
Referenced by config_file_read(), and load_rc_file().
static void parse_optionv | ( | gint * | argc, |
gchar *** | argv, | ||
gboolean | from_cmd_line | ||
) | [static] |
Definition at line 583 of file gui-config.c.
References HID_AttrNode::attributes, HID_Attr_Val::coord_value, HID_Attribute::default_val, HID_Attribute::enumerations, FALSE, get_unit_struct(), GetValue(), hid_attr_nodes, HID_Boolean, HID_Coord, HID_Enum, HID_Integer, HID_Label, HID_Mixed, HID_Path, HID_Real, HID_String, HID_Unit, unit::index, HID_Attr_Val::int_value, HID_AttrNode::n, HID_Attribute::name, HID_AttrNode::next, ok, HID_Attr_Val::real_value, HID_Attr_Val::str_value, unit::suffix, TRUE, HID_Attribute::type, unit, and HID_Attribute::value.
Referenced by ghid_config_files_read(), and load_rc_file().
void save_increments | ( | const Increments * | mm, |
const Increments * | mil | ||
) |
Definition at line 439 of file main.c.
Referenced by config_sizes_apply().
static gboolean set_config_attribute | ( | gchar * | option, |
gchar * | arg | ||
) | [static] |
Definition at line 421 of file gui-config.c.
References CONFIG_Boolean, CONFIG_Coord, CONFIG_Integer, CONFIG_Real, CONFIG_String, dup_string(), FALSE, GetValue(), lookup_config_attribute(), TRUE, ConfigAttribute::type, and ConfigAttribute::value.
Referenced by config_file_read().
static void text_spin_button_cb | ( | GtkSpinButton * | spin, |
void * | dst | ||
) | [static] |
Definition at line 1030 of file gui-config.c.
References GhidGui::config_modified, ghid_set_status_line_label(), ghidgui, and TRUE.
Referenced by config_sizes_tab_create().
gchar * board_size_override |
Definition at line 99 of file gui-config.c.
Referenced by ghid_config_files_read().
gchar * color_dir |
Definition at line 111 of file gui-config.c.
Referenced by config_color_load_cb(), config_color_save_cb(), and config_file_open().
gchar* color_file [static] |
Definition at line 102 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_file_set_label(), config_color_load_cb(), config_color_save_cb(), config_file_open(), ghid_config_files_read(), and ghid_config_init().
ConfigAttribute config_attributes[] [static] |
Definition at line 119 of file gui-config.c.
GtkWidget * config_color_file_label |
Definition at line 1783 of file gui-config.c.
Referenced by config_color_file_set_label(), and config_colors_tab_create().
GList* config_color_list [static] |
Definition at line 97 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_colors_read(), config_colors_tab_create(), config_colors_write(), and ghid_config_init().
GtkWidget * config_color_warn_label |
Definition at line 1783 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_load_cb(), config_color_save_cb(), config_color_set_cb(), and config_colors_tab_create().
gboolean config_colors_modified [static] |
Definition at line 1790 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_load_cb(), config_color_save_cb(), config_color_set_cb(), and config_colors_tab_create().
GtkWidget * config_colors_save_button |
Definition at line 1783 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_load_cb(), config_color_save_cb(), config_color_set_cb(), and config_colors_tab_create().
GtkWidget * config_colors_tab_vbox |
Definition at line 1783 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_load_cb(), and config_colors_tab_create().
GtkWidget* config_colors_vbox [static] |
Definition at line 1783 of file gui-config.c.
Referenced by config_color_defaults_cb(), config_color_load_cb(), and config_colors_tab_create().
gchar* config_dir [static] |
Definition at line 111 of file gui-config.c.
Referenced by config_file_open().
GtkWidget* config_groups_table [static] |
Definition at line 1299 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), and ghid_config_groups_changed().
GtkWidget * config_groups_vbox |
Definition at line 1299 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), config_layers_tab_create(), and ghid_config_groups_changed().
GtkWidget * config_groups_window |
Definition at line 1299 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), and ghid_config_groups_changed().
GtkWidget * config_increments_tab_vbox |
Definition at line 1163 of file gui-config.c.
Referenced by config_increments_tab_create(), and ghid_config_handle_units_changed().
GtkWidget* config_increments_vbox [static] |
Definition at line 1163 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), config_increments_tab_create(), and ghid_config_handle_units_changed().
gint config_layer_group[MAX_ALL_LAYER] [static] |
Definition at line 1308 of file gui-config.c.
Referenced by config_layer_group_button_state_update(), config_layer_groups_radio_button_cb(), and config_layers_apply().
GtkNotebook* config_notebook [static] |
Definition at line 2061 of file gui-config.c.
Referenced by config_selection_changed_cb(), and ghid_config_window_show().
GtkWidget * config_sizes_tab_vbox |
Definition at line 976 of file gui-config.c.
Referenced by config_sizes_tab_create(), and ghid_config_handle_units_changed().
GtkWidget* config_sizes_vbox [static] |
Definition at line 976 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), config_sizes_tab_create(), and ghid_config_handle_units_changed().
GtkWidget * config_text_spin_button |
Definition at line 976 of file gui-config.c.
Referenced by config_sizes_tab_create(), and ghid_config_text_scale_update().
GtkWidget* config_window [static] |
Definition at line 847 of file gui-config.c.
Referenced by config_close_cb(), config_destroy_cb(), ghid_config_layer_name_update(), ghid_config_text_scale_update(), and ghid_config_window_show().
GtkWidget* group_button[MAX_ALL_LAYER][MAX_GROUP] [static] |
Definition at line 1302 of file gui-config.c.
Referenced by config_layer_group_button_state_update(), and ghid_config_groups_changed().
gboolean groups_holdoff |
Definition at line 1314 of file gui-config.c.
Referenced by config_layer_group_button_state_update(), and config_layer_groups_radio_button_cb().
gboolean groups_modified [static] |
Definition at line 1314 of file gui-config.c.
Referenced by config_layer_groups_radio_button_cb(), config_layers_apply(), and ghid_config_layer_name_update().
GtkWidget* layer_entry[MAX_LAYER] [static] |
Definition at line 1301 of file gui-config.c.
Referenced by config_layers_apply(), ghid_config_groups_changed(), and ghid_config_layer_name_update().
LayerGroupType layer_groups [static] |
Definition at line 1310 of file gui-config.c.
Referenced by config_layers_apply().
gchar* layer_info_text[] [static] |
Definition at line 1316 of file gui-config.c.
Referenced by config_layers_tab_create().
gboolean layers_applying |
Definition at line 1314 of file gui-config.c.
Referenced by config_layers_apply(), and ghid_config_layer_name_update().
Definition at line 1310 of file gui-config.c.
gchar* lib_newlib_config [static] |
Definition at line 99 of file gui-config.c.
Referenced by config_library_apply(), config_library_tab_create(), and ghid_config_files_read().
GList * lib_newlib_list |
Definition at line 97 of file gui-config.c.
Referenced by ghid_config_files_read().
GtkWidget* library_newlib_entry [static] |
Definition at line 1257 of file gui-config.c.
Referenced by config_library_apply(), and config_library_tab_create().
Definition at line 983 of file gui-config.c.
Referenced by config_sizes_apply(), and config_sizes_tab_create().
Coord new_board_width [static] |
Definition at line 983 of file gui-config.c.
Referenced by config_sizes_apply(), and config_sizes_tab_create().
GtkWidget* use_board_size_default_button [static] |
Definition at line 979 of file gui-config.c.
Referenced by config_sizes_apply(), and config_sizes_tab_create().
GtkWidget * use_drc_sizes_default_button |
Definition at line 979 of file gui-config.c.
Referenced by config_sizes_apply(), and config_sizes_tab_create().
GtkWidget * use_increments_default_button |
Definition at line 979 of file gui-config.c.
Referenced by config_increments_tab_create(), and config_sizes_apply().