183 std::cerr << "building menus failed: " << ex.what(); |
184 std::cerr << "building menus failed: " << ex.what(); |
184 } |
185 } |
185 |
186 |
186 Gtk::Widget* menubar = uim->get_widget("/MenuBar"); |
187 Gtk::Widget* menubar = uim->get_widget("/MenuBar"); |
187 if (menubar){ |
188 if (menubar){ |
188 vbox.pack_start(*menubar, Gtk::PACK_SHRINK); |
189 //vbox.pack_start(*menubar, Gtk::PACK_SHRINK); |
|
190 table.attach(*menubar, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); |
189 } |
191 } |
190 |
192 |
191 Gtk::Widget* toolbar = uim->get_widget("/ToolBar"); |
193 Gtk::Widget* toolbar = uim->get_widget("/ToolBar"); |
192 if (toolbar) |
194 if (toolbar) |
193 { |
195 { |
194 static_cast<Gtk::Toolbar*>(toolbar)->set_toolbar_style(Gtk::TOOLBAR_ICONS); |
196 static_cast<Gtk::Toolbar*>(toolbar)->set_toolbar_style(Gtk::TOOLBAR_ICONS); |
195 vbox.pack_start(*toolbar, Gtk::PACK_SHRINK); |
197 //hbox.pack_start(*toolbar, Gtk::PACK_EXPAND_WIDGET); |
|
198 |
|
199 table.attach(*toolbar, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); |
|
200 |
196 } |
201 } |
|
202 |
|
203 auto_scale= new Gtk::CheckButton("Autoscale"); |
|
204 auto_scale->set_active(false); |
|
205 auto_scale->signal_toggled().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); |
|
206 |
|
207 table2.set_row_spacings(10); |
|
208 table2.set_col_spacings(5); |
|
209 |
|
210 table2.attach(*auto_scale, 0,2,0,1); |
|
211 |
|
212 Gtk::Label * unit_label= new Gtk::Label("Unit:"); |
|
213 table2.attach(*unit_label, 2,3,0,1); |
|
214 |
|
215 Gtk::Adjustment * adjustment_unit=new Gtk::Adjustment(20, 5, 200, 5, 10); |
|
216 |
|
217 radius_unit = new Gtk::SpinButton(*adjustment_unit, 5,0); |
|
218 radius_unit->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); |
|
219 table2.attach(*radius_unit, 3,4,0,1); |
|
220 |
|
221 Gtk::Label * min_label= new Gtk::Label("Min:"); |
|
222 table2.attach(*min_label, 0,1,1,2); |
|
223 |
|
224 Gtk::Adjustment * adjustment_min=new Gtk::Adjustment(20, 5, 200, 5, 10); |
|
225 |
|
226 radius_min = new Gtk::SpinButton(*adjustment_min, 5,0); |
|
227 radius_min->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); |
|
228 table2.attach(*radius_min, 1,2,1,2); |
|
229 |
|
230 Gtk::Label * max_label= new Gtk::Label("Max:"); |
|
231 table2.attach(*max_label, 2,3,1,2); |
|
232 |
|
233 Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 5, 200, 5, 10); |
|
234 |
|
235 radius_max = new Gtk::SpinButton(*adjustment_max, 5,0); |
|
236 radius_max->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); |
|
237 table2.attach(*radius_max, 3,4,1,2); |
|
238 |
|
239 //vbox.pack_start(hbox, Gtk::PACK_SHRINK); |
|
240 table.attach(table2, 1, 2, 0, 2, Gtk::SHRINK, Gtk::SHRINK); |
197 |
241 |
198 tooltips.set_tip(*(uim->get_widget("/ToolBar/CreateNode")),"Create Node"); |
242 tooltips.set_tip(*(uim->get_widget("/ToolBar/CreateNode")),"Create Node"); |
199 tooltips.enable(); |
243 tooltips.enable(); |
200 |
244 |
201 active_tab=-1; |
245 active_tab=-1; |
202 notebook.signal_switch_page().connect(sigc::mem_fun(*this, &MainWin::onChangeTab)); |
246 notebook.signal_switch_page().connect(sigc::mem_fun(*this, &MainWin::onChangeTab)); |
203 |
247 |
204 active_tool = MOVE; |
248 active_tool = MOVE; |
205 |
249 |
206 vbox.pack_start(notebook); |
250 //vbox.pack_start(notebook); |
|
251 table.attach(notebook,0,2,2,3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL); |
207 |
252 |
208 show_all_children(); |
253 show_all_children(); |
209 } |
254 } |
210 |
255 |
211 void MainWin::set_tabtitle(std::string name) |
256 void MainWin::set_tabtitle(std::string name) |