source: synfigstudio/trunk/fuentes/src/gui/dials/toggleducksdial.h @ 481

Last change on this file since 481 was 481, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 2.9 KB
Line 
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/tooltip.h>
34#include <gtkmm/table.h>
35#include <gtkmm/toolbar.h>
36#include <gtkmm/toggletoolbutton.h>
37#include "duckmatic.h"
38
39#include "general.h"
40
41
42/* === M A C R O S ========================================================= */
43
44/* === T Y P E D E F S ===================================================== */
45
46/* === C L A S S E S & S T R U C T S ======================================= */
47
48namespace studio
49{
50
51class ToggleDucksDial
52{
53        Gtk::ToggleToolButton ducks_position;
54        Gtk::ToggleToolButton ducks_vertex;
55        Gtk::ToggleToolButton ducks_tangent;
56        Gtk::ToggleToolButton ducks_radius;
57        Gtk::ToggleToolButton ducks_width;
58        Gtk::ToggleToolButton ducks_angle;
59
60        void init_label_button(Gtk::ToggleToolButton &button, Gtk::IconSize iconsize, const char *stockid, const char *label, const char *tooltip);
61
62public:
63
64        ToggleDucksDial(const Gtk::IconSize &size);
65        void update_toggles(Duck::Type mask);
66
67        void insert_to_toolbar(Gtk::Toolbar &toolbar, int index = -1);
68        void remove_from_toolbar(Gtk::Toolbar &toolbar);
69
70        Glib::SignalProxy0<void> signal_ducks_position()  { return ducks_position.signal_toggled(); }
71        Glib::SignalProxy0<void> signal_ducks_vertex()    { return ducks_vertex.  signal_toggled(); }
72        Glib::SignalProxy0<void> signal_ducks_tangent()   { return ducks_tangent. signal_toggled(); }
73        Glib::SignalProxy0<void> signal_ducks_radius()    { return ducks_radius.  signal_toggled(); }
74        Glib::SignalProxy0<void> signal_ducks_width()     { return ducks_width.   signal_toggled(); }
75        Glib::SignalProxy0<void> signal_ducks_angle()     { return ducks_angle.   signal_toggled(); }
76
77}; // END of class ToggleDucksDial
78
79}; // END of namespace studio
80
81
82/* === E N D =============================================================== */
83
84#endif
Note: See TracBrowser for help on using the repository browser.