]> git.tdb.fi Git - r2c2.git/blob - trackbar.cpp
b05f3c85ecaa77181270f5d0a262315ed3ab6b5c
[r2c2.git] / trackbar.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 "trackbar.h"
10
11 using namespace Msp;
12
13 Trackbar::Trackbar(Designer &designer):
14         Toolbar("Track", 240)
15 {
16         GLtk::Button *btn;
17
18         pnl_content->add(*(btn = new GLtk::Button("New")));
19         btn->set_geometry(GLtk::Geometry(0, 10, 40, 24));
20         btn->set_style("green");
21         btn->set_tooltip("Add a track piece (N)");
22         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::new_track));
23
24         pnl_content->add(*(btn = new GLtk::Button("Del")));
25         btn->set_geometry(GLtk::Geometry(40, 10, 40, 24));
26         btn->set_style("red");
27         btn->set_tooltip("Delete selected tracks (X)");
28         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::erase_tracks));
29
30         pnl_content->add(*(btn = new GLtk::Button("Prop")));
31         btn->set_geometry(GLtk::Geometry(80, 10, 40, 24));
32         btn->set_tooltip("Change properties of selected tracks (P)");
33         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::track_properties));
34
35         pnl_content->add(*(btn = new GLtk::Button("Xtnd")));
36         btn->set_geometry(GLtk::Geometry(120, 10, 40, 24));
37         btn->set_tooltip("Extend straight track out of free endpoint (Shift+N)");
38         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::extend_track));
39
40         pnl_content->add(*(btn = new GLtk::Button("Conn")));
41         btn->set_geometry(GLtk::Geometry(160, 10, 40, 24));
42         btn->set_tooltip("Connect free endpoints of selected tracks (C)");
43         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::connect_tracks));
44
45         pnl_content->add(*(btn = new GLtk::Button("Flat")));
46         btn->set_geometry(GLtk::Geometry(200, 10, 40, 24));
47         btn->set_tooltip("Make selected tracks flat (F)");
48         btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::flatten_tracks));
49 }