1 /* === S Y N F I G ========================================================= */
2 /*!	\file resolutiondial.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_RESOLUTIONDIAL_H
29 #define __SYNFIG_STUDIO_RESOLUTIONDIAL_H
30 
31 /* === H E A D E R S ======================================================= */
32 
33 #include <gtkmm/tooltip.h>
34 #include <gtkmm/toolbar.h>
35 #include <gtkmm/toolbutton.h>
36 #include <gtkmm/toggletoolbutton.h>
37 #include "duckmatic.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 ResolutionDial
49 {
50 	Gtk::ToolButton increase_resolution;
51 	Gtk::ToolButton decrease_resolution;
52 	Gtk::ToggleToolButton use_low_resolution;
53 
54 	void init_button(Gtk::ToolButton &button, Gtk::IconSize size, const Gtk::StockID &stockid, const char *text, const char *tooltip);
55 	void init_toggle_button(Gtk::ToggleToolButton &button, const char *label, const char *tooltip);
56 
57 public:
58 	ResolutionDial(const Gtk::IconSize &size);
59 
60 	void insert_to_toolbar(Gtk::Toolbar &toolbar, int index = -1);
61 	void remove_from_toolbar(Gtk::Toolbar &toolbar);
62 
63 	void update_lowres(bool flag);
signal_increase_resolution()64 	Glib::SignalProxy0<void> signal_increase_resolution()  { return increase_resolution.signal_clicked(); }
signal_decrease_resolution()65 	Glib::SignalProxy0<void> signal_decrease_resolution()  { return decrease_resolution.signal_clicked(); }
signal_use_low_resolution()66 	Glib::SignalProxy0<void> signal_use_low_resolution()   { return use_low_resolution. signal_toggled(); }
67 
68 }; // END of class ResolutionDial
69 
70 }; // END of namespace studio
71 
72 
73 /* === E N D =============================================================== */
74 
75 #endif
76