Added missing '\endlegal'.
[synfig.git] / synfig-studio / trunk / src / gtkmm / toolbox.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file toolbox.h
3 **      \brief Header File
4 **
5 **      \legal
6 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
7 **
8 **      This package is free software; you can redistribute it and/or
9 **      modify it under the terms of the GNU General Public License as
10 **      published by the Free Software Foundation; either version 2 of
11 **      the License, or (at your option) any later version.
12 **
13 **      This package is distributed in the hope that it will be useful,
14 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
15 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 **      General Public License for more details.
17 **      \endlegal
18 **
19 ** === N O T E S ===========================================================
20 **
21 ** ========================================================================= */
22
23 /* === S T A R T =========================================================== */
24
25 #ifndef __SYNFIG_GTKMM_TOOLBOX_H
26 #define __SYNFIG_GTKMM_TOOLBOX_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <gtkmm/window.h>
31 #include <gtkmm/tooltips.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/togglebutton.h>
34 #include <gtkmm/menu.h>
35 #include <gtkmm/table.h>
36 #include <synfig/string.h>
37 #include "smach.h"
38 #include <map>
39 #include "dialogsettings.h"
40
41 /* === M A C R O S ========================================================= */
42
43 /* === T Y P E D E F S ===================================================== */
44
45 /* === C L A S S E S & S T R U C T S ======================================= */
46
47 namespace studio {
48
49 class Dockable;
50 class StateManager;
51
52 class Toolbox : public Gtk::Window
53 {
54         friend class studio::StateManager;
55
56         DialogSettings dialog_settings;
57
58         Gtk::Tooltips tooltips;
59         Gtk::Button *button_undo;
60         Gtk::Button *button_redo;
61
62         Gtk::Button *button_eyedrop;
63         Gtk::Button *button_rotoscope;
64         Gtk::Button *button_rotoscope_bline;
65         Gtk::Button *button_rotoscope_polygon;
66
67         Gtk::Table *tool_table;
68
69         std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
70
71         Gtk::Menu       *recent_files_menu;
72
73         Gtk::Menu       *dock_dialogs;
74
75         bool changing_state_;
76
77         void on_recent_files_changed();
78         void on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
79
80         void change_state_(const Smach::state_base *state);
81
82 public:
83
84         void change_state(const synfig::String& statename);
85
86         void update_undo_redo();
87
88         void refresh() { update_undo_redo(); }
89
90         void set_active_state(const synfig::String& statename);
91
92         void add_state(const Smach::state_base *state);
93
94
95         void dockable_registered(Dockable* x);
96
97         Toolbox();
98         virtual ~Toolbox();
99
100 };
101
102 }; // END of namespace studio
103
104 /* === E N D =============================================================== */
105
106 #endif