1 /* === S Y N F I G ========================================================= */
6 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
19 ** === N O T E S ===========================================================
21 ** ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_GTKMM_TOOLBOX_H
26 #define __SYNFIG_GTKMM_TOOLBOX_H
28 /* === H E A D E R S ======================================================= */
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>
39 #include "dialogsettings.h"
41 /* === M A C R O S ========================================================= */
43 /* === T Y P E D E F S ===================================================== */
45 /* === C L A S S E S & S T R U C T S ======================================= */
52 class Toolbox : public Gtk::Window
54 friend class studio::StateManager;
56 DialogSettings dialog_settings;
58 Gtk::Tooltips tooltips;
59 Gtk::Button *button_undo;
60 Gtk::Button *button_redo;
62 Gtk::Button *button_eyedrop;
63 Gtk::Button *button_rotoscope;
64 Gtk::Button *button_rotoscope_bline;
65 Gtk::Button *button_rotoscope_polygon;
67 Gtk::Table *tool_table;
69 std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
71 Gtk::Menu *recent_files_menu;
73 Gtk::Menu *dock_dialogs;
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);
80 void change_state_(const Smach::state_base *state);
84 void change_state(const synfig::String& statename);
86 void update_undo_redo();
88 void refresh() { update_undo_redo(); }
90 void set_active_state(const synfig::String& statename);
92 void add_state(const Smach::state_base *state);
95 void dockable_registered(Dockable* x);
102 }; // END of namespace studio
104 /* === E N D =============================================================== */