Use Toggle buttons instead of Buttons for toggle ducks.
[synfig.git] / synfig-studio / trunk / src / gtkmm / toggleducksdial.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file toggleducksdial.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **      Copyright (c) 2008 Chris Moore
10 **      Copyright (c) 2009 Gerco Ballintijn
11 **      Copyright (c) 2009 Carlos Lopez
12 **
13 **      This package is free software; you can redistribute it and/or
14 **      modify it under the terms of the GNU General Public License as
15 **      published by the Free Software Foundation; either version 2 of
16 **      the License, or (at your option) any later version.
17 **
18 **      This package is distributed in the hope that it will be useful,
19 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
20 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 **      General Public License for more details.
22 **      \endlegal
23 */
24 /* ========================================================================= */
25
26 /* === S T A R T =========================================================== */
27
28 #ifndef __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
29 #define __SYNFIG_STUDIO_TOOGLEDUCKSDIAL_H
30
31 /* === H E A D E R S ======================================================= */
32
33 #include <gtkmm/tooltips.h>
34 #include <gtkmm/table.h>
35 #include <gtkmm/togglebutton.h>
36
37 #include "general.h"
38
39 /* === M A C R O S ========================================================= */
40
41 /* === T Y P E D E F S ===================================================== */
42
43 /* === C L A S S E S & S T R U C T S ======================================= */
44
45 namespace studio
46 {
47
48 class ToggleDucksDial : public Gtk::Table
49 {
50         Gtk::Tooltips tooltips;
51
52         Gtk::ToggleButton *ducks_position;
53         Gtk::ToggleButton *ducks_vertex;
54         Gtk::ToggleButton *ducks_tangent;
55         Gtk::ToggleButton *ducks_radius;
56         Gtk::ToggleButton *ducks_width;
57         Gtk::ToggleButton *ducks_angle;
58
59         Gtk::ToggleButton *create_label_button(Gtk::IconSize iconsize, const char * label, const char * tooltip);
60
61 public:
62
63         ToggleDucksDial();
64         Glib::SignalProxy0<void> signal_ducks_position()  { return ducks_position->signal_toggled(); }
65         Glib::SignalProxy0<void> signal_ducks_vertex()    { return ducks_vertex->  signal_toggled(); }
66         Glib::SignalProxy0<void> signal_ducks_tangent()   { return ducks_tangent-> signal_toggled(); }
67         Glib::SignalProxy0<void> signal_ducks_radius()    { return ducks_radius->  signal_toggled(); }
68         Glib::SignalProxy0<void> signal_ducks_width()     { return ducks_width->   signal_toggled(); }
69         Glib::SignalProxy0<void> signal_ducks_angle()     { return ducks_angle->   signal_toggled(); }
70
71         Gtk::ToggleButton * get_position_toggle() { return ducks_position; }
72         Gtk::ToggleButton * get_vertex_toggle()   { return ducks_vertex; }
73         Gtk::ToggleButton * get_tangent_toggle()  { return ducks_tangent; }
74         Gtk::ToggleButton * get_radius_toggle()   { return ducks_radius; }
75         Gtk::ToggleButton * get_width_toggle()    { return ducks_width; }
76         Gtk::ToggleButton * get_angle_toggle()    { return ducks_angle; }
77
78 }; // END of class ToggleDucksDial
79
80 }; // END of namespace studio
81
82
83 /* === E N D =============================================================== */
84
85 #endif