1 /* === S Y N F I G ========================================================= */
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 ** === N O T E S ===========================================================
23 ** ========================================================================= */
25 /* === S T A R T =========================================================== */
27 #ifndef __SYNFIG_GTKMM_TOOLBOX_H
28 #define __SYNFIG_GTKMM_TOOLBOX_H
30 /* === H E A D E R S ======================================================= */
32 #include <gtkmm/window.h>
33 #include <gtkmm/tooltips.h>
34 #include <gtkmm/button.h>
35 #include <gtkmm/togglebutton.h>
36 #include <gtkmm/menu.h>
37 #include <gtkmm/table.h>
38 #include <synfig/string.h>
41 #include "dialogsettings.h"
43 /* === M A C R O S ========================================================= */
45 /* === T Y P E D E F S ===================================================== */
47 /* === C L A S S E S & S T R U C T S ======================================= */
54 class Toolbox : public Gtk::Window
56 friend class studio::StateManager;
58 DialogSettings dialog_settings;
60 Gtk::Tooltips tooltips;
61 Gtk::Button *button_undo;
62 Gtk::Button *button_redo;
64 Gtk::Button *button_eyedrop;
65 Gtk::Button *button_rotoscope;
66 Gtk::Button *button_rotoscope_bline;
67 Gtk::Button *button_rotoscope_polygon;
69 Gtk::Table *tool_table;
71 std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
73 Gtk::Menu *recent_files_menu;
75 Gtk::Menu *dock_dialogs;
79 void on_recent_files_changed();
80 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);
82 void change_state_(const Smach::state_base *state);
86 void change_state(const synfig::String& statename);
88 void update_undo_redo();
90 void refresh() { update_undo_redo(); }
92 void set_active_state(const synfig::String& statename);
94 void add_state(const Smach::state_base *state);
97 void dockable_registered(Dockable* x);
104 }; // END of namespace studio
106 /* === E N D =============================================================== */