Moved 3 rc promotion keywords from gschem into libgeda (fix for bug#1748143)
[geda-gaf/peter-b.git] / gschem / src / i_vars.c
blobc4c181a9cc832eb1be8de98600633ffc405ec3bc
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2007 Ales Hvezda
4 * Copyright (C) 1998-2007 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
20 #include <config.h>
21 #include <stdio.h>
23 #include <libgeda/libgeda.h>
25 #include "../include/x_states.h"
26 #include "../include/prototype.h"
28 #ifdef HAVE_LIBDMALLOC
29 #include <dmalloc.h>
30 #endif
32 int default_graphic_color = GRAPHIC_COLOR;
33 int default_text_color = TEXT_COLOR;
34 int default_text_size = 10;
35 int default_text_caps = LOWER;
36 float default_postscript_font_scale = 1.0;
37 int default_attribute_color = ATTRIBUTE_COLOR;
38 int default_detachattr_color = DETACHED_ATTRIBUTE_COLOR;
39 int default_net_color = NET_COLOR;
40 int default_bus_color = BUS_COLOR;
41 int default_net_endpoint_color = NET_ENDPOINT_COLOR;
42 int default_junction_color = JUNCTION_COLOR;
43 int default_override_net_color = -1;
44 int default_override_bus_color = -1;
45 int default_override_pin_color = -1;
46 int default_net_endpoint_mode = FILLEDBOX;
47 int default_net_midpoint_mode = FILLED;
48 int default_pin_color = PIN_COLOR;
49 int default_pin_style = THICK;
50 int default_net_style = THICK;
51 int default_bus_style = THICK;
52 int default_line_style = THICK;
53 int default_grid_color = GRID_COLOR;
54 int default_background_color = BACKGROUND_COLOR;
55 int default_select_color = SELECT_COLOR;
56 int default_bb_color = BOUNDINGBOX_COLOR;
57 int default_lock_color = LOCK_COLOR;
58 int default_zoom_box_color = ZOOM_BOX_COLOR;
59 int default_logic_bubble_color = LOGIC_BUBBLE_COLOR;
60 int default_actionfeedback_mode = OUTLINE;
61 int default_zoom_with_pan = TRUE;
62 int default_object_clipping = TRUE;
63 int default_do_logging = TRUE;
64 int default_logging_dest = LOG_WINDOW;
65 int default_embed_complex = FALSE;
66 int default_include_complex = FALSE;
67 int default_text_output = VECTOR_FONTS;
68 int default_snap_size = 100;
69 int default_stroke_color = STROKE_COLOR;
71 int default_paper_width = 11000; /* letter size */
72 int default_paper_height = 85000;
73 int default_scrollbars_flag = TRUE;
74 int default_print_orientation = LANDSCAPE;
75 int default_image_color = FALSE;
76 int default_image_width = 800;
77 int default_image_height = 600;
78 int default_print_color = FALSE;
79 int default_print_color_background = OUTPUT_BACKGROUND_COLOR;
80 int default_print_output_type = EXTENTS;
81 int default_print_output_capstyle = SQUARE_CAP;
82 int default_log_window = MAP_ON_STARTUP;
83 int default_log_window_type = DECORATED;
84 int default_third_button = POPUP_ENABLED;
85 #ifdef HAS_LIBSTROKE
86 int default_middle_button = STROKE;
87 #else
88 int default_middle_button = REPEAT;
89 #endif
90 int default_net_consolidate = TRUE;
91 int default_file_preview = FALSE;
92 int default_enforce_hierarchy = TRUE;
93 int default_text_origin_marker = TRUE;
94 int default_fast_mousepan = TRUE;
95 int default_raise_dialog_boxes = FALSE;
96 int default_continue_component_place = TRUE;
97 int default_undo_levels = 20;
98 int default_undo_control = TRUE;
99 int default_undo_type = UNDO_DISK;
100 int default_draw_grips = TRUE;
101 int default_netconn_rubberband = FALSE;
102 int default_sort_component_library = FALSE;
103 int default_warp_cursor = TRUE;
104 int default_toolbars = TRUE;
105 int default_handleboxes = TRUE;
106 int default_setpagedevice_orientation = FALSE;
107 int default_setpagedevice_pagesize = FALSE;
108 int default_bus_ripper_size = 200;
109 int default_bus_ripper_type = COMP_BUS_RIPPER;
110 int default_bus_ripper_rotation = NON_SYMMETRIC;
111 int default_force_boundingbox = FALSE;
112 int default_grid_dot_size = 1;
113 int default_grid_mode = GRID_VARIABLE_MODE;
114 int default_grid_fixed_threshold = 10;
115 int default_print_vector_threshold = 3;
116 int default_add_attribute_offset = 50;
118 int default_auto_save_interval = 120;
120 int default_drag_can_move = TRUE;
122 int default_width = 800; /* these variables are used in x_window.c */
123 int default_height = 600;
125 /* default zoom_factor at which text is displayed completely */
126 int default_text_display_zoomfactor = 30;
128 int default_text_feedback = ONLY_WHEN_READABLE;
129 int default_mousepan_gain = 5;
130 int default_keyboardpan_gain = 20;
131 int default_select_slack_pixels = 4;
133 /*! \todo Finish function documentation!!!
134 * \brief
135 * \par Function Description
138 void i_vars_set(TOPLEVEL *w_current)
140 i_vars_libgeda_set(w_current);
142 /* this will be false if logging cannot be enabled */
143 if (do_logging != FALSE) {
144 do_logging = default_do_logging;
147 logging_dest = default_logging_dest;
149 w_current->graphic_color = default_graphic_color;
150 w_current->text_color = default_text_color;
151 w_current->text_size = default_text_size;
152 w_current->text_caps = default_text_caps;
153 w_current->postscript_font_scale = default_postscript_font_scale;
155 w_current->attribute_color = default_attribute_color;
156 w_current->detachedattr_color = default_detachattr_color;
157 w_current->logic_bubble_color = default_logic_bubble_color;
159 w_current->grid_color = default_grid_color;
160 w_current->background_color = default_background_color;
161 w_current->select_color = default_select_color;
162 w_current->stroke_color = default_stroke_color;
164 w_current->bb_color = default_bb_color;
165 w_current->zoom_box_color = default_zoom_box_color;
166 w_current->lock_color = default_lock_color;
168 w_current->net_color = default_net_color;
169 w_current->net_style = default_net_style;
170 w_current->net_endpoint_color = default_net_endpoint_color;
171 w_current->net_endpoint_mode = default_net_endpoint_mode;
172 w_current->net_midpoint_mode = default_net_midpoint_mode;
173 w_current->override_net_color = default_override_net_color;
175 w_current->junction_color = default_junction_color;
177 w_current->bus_color = default_bus_color;
178 w_current->bus_style = default_bus_style;
179 w_current->override_bus_color = default_override_bus_color;
181 w_current->pin_color = default_pin_color;
182 w_current->pin_style = default_pin_style;
183 w_current->override_pin_color = default_override_pin_color;
185 w_current->line_style = default_line_style;
187 w_current->zoom_with_pan = default_zoom_with_pan;
188 w_current->actionfeedback_mode = default_actionfeedback_mode;
189 w_current->text_display_zoomfactor = default_text_display_zoomfactor;
190 w_current->text_feedback = default_text_feedback;
191 w_current->scrollbars_flag = default_scrollbars_flag;
193 w_current->object_clipping = default_object_clipping;
194 w_current->embed_complex = default_embed_complex;
195 w_current->include_complex = default_include_complex;
196 w_current->text_output = default_text_output;
197 w_current->snap_size = default_snap_size;
198 w_current->log_window = default_log_window;
199 w_current->log_window_type = default_log_window_type;
201 w_current->print_output_type = default_print_output_type;
202 w_current->print_output_capstyle = default_print_output_capstyle;
203 w_current->print_orientation = default_print_orientation;
204 w_current->print_color = default_print_color;
205 w_current->print_color_background = default_print_color_background;
206 w_current->setpagedevice_orientation = default_setpagedevice_orientation;
207 w_current->setpagedevice_pagesize = default_setpagedevice_pagesize;
209 w_current->image_color = default_image_color;
210 w_current->image_width = default_image_width;
211 w_current->image_height = default_image_height;
212 w_current->third_button = default_third_button;
213 w_current->middle_button = default_middle_button;
214 w_current->net_consolidate = default_net_consolidate;
215 w_current->file_preview = default_file_preview;
216 w_current->enforce_hierarchy = default_enforce_hierarchy;
217 w_current->text_origin_marker = default_text_origin_marker;
218 w_current->fast_mousepan = default_fast_mousepan;
219 w_current->raise_dialog_boxes = default_raise_dialog_boxes;
220 w_current->continue_component_place = default_continue_component_place;
221 w_current->undo_levels = default_undo_levels;
222 w_current->undo_control = default_undo_control;
223 w_current->undo_type = default_undo_type;
225 w_current->draw_grips = default_draw_grips;
226 w_current->netconn_rubberband = default_netconn_rubberband;
227 w_current->sort_component_library = default_sort_component_library;
228 w_current->warp_cursor = default_warp_cursor;
229 w_current->toolbars = default_toolbars;
230 w_current->handleboxes = default_handleboxes;
232 w_current->paper_width = default_paper_width;
233 w_current->paper_height = default_paper_height;
235 w_current->bus_ripper_size = default_bus_ripper_size;
236 w_current->bus_ripper_type = default_bus_ripper_type;
237 w_current->bus_ripper_rotation = default_bus_ripper_rotation;
239 w_current->force_boundingbox = default_force_boundingbox;
240 w_current->grid_dot_size = default_grid_dot_size;
241 w_current->grid_mode = default_grid_mode;
242 w_current->grid_fixed_threshold = default_grid_fixed_threshold;
243 w_current->print_vector_threshold = default_print_vector_threshold;
244 w_current->add_attribute_offset = default_add_attribute_offset;
246 w_current->drag_can_move = default_drag_can_move;
248 w_current->mousepan_gain = default_mousepan_gain;
249 w_current->keyboardpan_gain = default_keyboardpan_gain;
251 w_current->select_slack_pixels = default_select_slack_pixels;
253 w_current->auto_save_interval = default_auto_save_interval;