]> git.tdb.fi Git - r2c2.git/blob - source/designer/layoutbar.cpp
3e17eac12123f0b130a0a9b2bdb48c0a84245902
[r2c2.git] / source / designer / layoutbar.cpp
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #include "designer.h"
9 #include "layoutbar.h"
10
11 using namespace Msp;
12
13 Layoutbar::Layoutbar(Designer &designer):
14         Toolbar("Layout", 160)
15 {
16         GLtk::Button *btn;
17
18         pnl_content->add(*(btn = new GLtk::Button("Load")));
19         btn->set_geometry(GLtk::Geometry(0, 10, 40, 24));
20         btn->set_tooltip("Load layout (not implemented)");
21
22         pnl_content->add(*(btn = new GLtk::Button("Save")));
23         btn->set_geometry(GLtk::Geometry(40, 10, 40, 24));
24         btn->set_tooltip("Save current layout (W)");
25         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::save));
26
27         pnl_content->add(*(btn = new GLtk::Button("SVG")));
28         btn->set_geometry(GLtk::Geometry(80, 10, 40, 24));
29         btn->set_tooltip("Export layout as SVG (V)");
30         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::svg_export));
31
32         pnl_content->add(*(btn = new GLtk::Button("Quit")));
33         btn->set_geometry(GLtk::Geometry(120, 10, 40, 24));
34         btn->set_style("red");
35         btn->set_tooltip("Exit Designer");
36         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::quit));
37 }