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::Table *tool_table;
66 std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
68 Gtk::Menu *recent_files_menu;
70 Gtk::Menu *dock_dialogs;
74 void on_recent_files_changed();
75 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);
77 void change_state_(const Smach::state_base *state);
81 void change_state(const synfig::String& statename);
83 void update_undo_redo();
85 void refresh() { update_undo_redo(); }
87 void set_active_state(const synfig::String& statename);
89 void add_state(const Smach::state_base *state);
92 void dockable_registered(Dockable* x);
99 }; // END of namespace studio
101 /* === E N D =============================================================== */