Updated copyright text/header in most source files.
[geda-gaf.git] / gschem / src / gschem_toplevel.c
blobc9f4a58ebaaa7d5307fe917a8da2469c68d8cafe
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2010 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>
22 #include "gschem.h"
24 GSCHEM_TOPLEVEL *gschem_toplevel_new ()
26 GSCHEM_TOPLEVEL *w_current;
28 w_current = g_new0 (GSCHEM_TOPLEVEL, 1);
30 w_current->toplevel = NULL;
32 /* ------------------- */
33 /* main window widgets */
34 /* ------------------- */
35 w_current->main_window = NULL;
36 w_current->drawing_area = NULL;
37 w_current->menubar = NULL;
38 w_current->popup_menu = NULL;
39 w_current->h_scrollbar = NULL;
40 w_current->v_scrollbar = NULL;
41 w_current->h_adjustment = NULL;
42 w_current->v_adjustment = NULL;
43 w_current->left_label = NULL;
44 w_current->middle_label = NULL;
45 w_current->right_label = NULL;
46 w_current->grid_label = NULL;
47 w_current->status_label = NULL;
49 w_current->toolbar_select = NULL;
50 w_current->toolbar_net = NULL;
51 w_current->toolbar_bus = NULL;
53 w_current->keyaccel_string = NULL;
55 /* ------------ */
56 /* Dialog boxes */
57 /* ------------ */
58 w_current->sowindow = NULL;
59 w_current->pfswindow = NULL;
60 w_current->cswindow = NULL;
61 w_current->iwindow = NULL;
62 w_current->pswindow = NULL;
63 w_current->tiwindow = NULL;
64 w_current->tewindow = NULL;
65 w_current->sewindow = NULL;
66 w_current->aawindow = NULL;
67 w_current->mawindow = NULL;
68 w_current->aewindow = NULL;
69 w_current->trwindow = NULL;
70 w_current->tswindow = NULL;
71 w_current->tshowwindow = NULL;
72 w_current->thidewindow = NULL;
73 w_current->tfindwindow = NULL;
74 w_current->abwindow = NULL;
75 w_current->hkwindow = NULL;
76 w_current->clwindow = NULL;
77 w_current->edit_color = 0;
78 w_current->cowindow = NULL;
79 w_current->coord_world = NULL;
80 w_current->coord_screen = NULL;
82 /* ----------------- */
83 /* Picture placement */
84 /* ----------------- */
85 w_current->current_pixbuf = NULL;
86 w_current->pixbuf_filename = NULL;
87 w_current->pixbuf_wh_ratio = 0;
89 /* ---------------------- */
90 /* graphics context stuff */
91 /* ---------------------- */
92 w_current->gc = NULL;
94 /* ---------------- */
95 /* Drawing surfaces */
96 /* ---------------- */
97 w_current->window = NULL;
98 w_current->drawable = NULL;
99 w_current->cr = NULL;
100 w_current->pl = NULL;
101 w_current->win_width = 0;
102 w_current->win_height = 0;
104 /* ------------- */
105 /* Drawing state */
106 /* ------------- */
107 w_current->first_wx = -1;
108 w_current->first_wy = -1;
109 w_current->second_wx = -1;
110 w_current->second_wy = -1;
111 w_current->third_wx = -1;
112 w_current->third_wy = -1;
113 w_current->distance = 0;
114 w_current->magnetic_wx = -1;
115 w_current->magnetic_wy = -1;
116 w_current->inside_action = 0;
117 w_current->rubber_visible = 0;
118 w_current->net_direction = 0;
119 w_current->which_grip = -1;
120 w_current->which_object = NULL;
122 /* --------------------- */
123 /* Gschem internal state */
124 /* --------------------- */
125 w_current->num_untitled = 0;
126 w_current->event_state = SELECT;
127 w_current->image_width = 0;
128 w_current->image_height = 0;
129 w_current->grid = GRID_MESH;
130 w_current->min_zoom = 0;
131 w_current->max_zoom = 8;
132 w_current->text_alignment = 0;
133 w_current->drawbounding_action_mode = FREE;
134 w_current->last_drawb_mode = LAST_DRAWB_MODE_NONE;
135 w_current->CONTROLKEY = 0;
136 w_current->SHIFTKEY = 0;
137 w_current->ALTKEY = 0;
138 w_current->doing_pan = 0;
139 w_current->buffer_number = 0;
140 w_current->last_callback = NULL;
141 w_current->clipboard_buffer = NULL;
143 /* ------------------ */
144 /* rc/user parameters */
145 /* ------------------ */
146 w_current->text_caps = 0;
147 w_current->text_size = 0;
149 w_current->zoom_with_pan = 0;
150 w_current->actionfeedback_mode = OUTLINE;
151 w_current->text_feedback = 0;
152 w_current->text_display_zoomfactor = 0;
153 w_current->net_endpoint_mode = NONE;
154 w_current->net_midpoint_mode = NONE;
155 w_current->net_direction_mode = TRUE;
156 w_current->net_selection_mode = 0;
157 w_current->net_selection_state = 0;
158 w_current->embed_complex = 0;
159 w_current->include_complex = 0;
160 w_current->scrollbars_flag = 0;
161 w_current->log_window = 0;
162 w_current->log_window_type = 0;
163 w_current->third_button = 0;
164 w_current->middle_button = 0;
165 w_current->file_preview = 0;
166 w_current->enforce_hierarchy = 0;
167 w_current->text_origin_marker = 0;
168 w_current->fast_mousepan = 0;
169 w_current->raise_dialog_boxes = 0;
170 w_current->continue_component_place = 0;
171 w_current->component_select_attrlist = NULL;
172 w_current->undo_levels = 0;
173 w_current->undo_control = 0;
174 w_current->undo_type = 0;
175 w_current->undo_panzoom = 0;
176 w_current->draw_grips = 0;
177 w_current->netconn_rubberband = 0;
178 w_current->sort_component_library = 0;
179 w_current->warp_cursor = 0;
180 w_current->toolbars = 0;
181 w_current->handleboxes = 0;
182 w_current->bus_ripper_size = 0;
183 w_current->bus_ripper_type = 0;
184 w_current->bus_ripper_rotation = 0;
185 w_current->magneticnet_mode = 0;
186 w_current->dots_grid_fixed_threshold = 10;
187 w_current->dots_grid_dot_size = 1;
188 w_current->dots_grid_mode = DOTS_GRID_VARIABLE_MODE;
189 w_current->mesh_grid_display_threshold = 3;
190 w_current->add_attribute_offset = 50;
191 w_current->drag_can_move = TRUE;
192 w_current->mousepan_gain = 5;
193 w_current->keyboardpan_gain = 10;
194 w_current->select_slack_pixels = 4;
195 w_current->zoom_gain = 20;
196 w_current->scrollpan_steps = 8;
198 w_current->print_command = NULL;
200 return w_current;