1 /*! ========================================================================
3 ** Template Header File
4 ** $Id: toolbox.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
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.
18 ** === N O T E S ===========================================================
20 ** ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_GTKMM_TOOLBOX_H
25 #define __SYNFIG_GTKMM_TOOLBOX_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/window.h>
30 #include <gtkmm/tooltips.h>
31 #include <gtkmm/button.h>
32 #include <gtkmm/togglebutton.h>
33 #include <gtkmm/menu.h>
34 #include <gtkmm/table.h>
35 #include <synfig/string.h>
38 #include "dialogsettings.h"
40 /* === M A C R O S ========================================================= */
42 /* === T Y P E D E F S ===================================================== */
44 /* === C L A S S E S & S T R U C T S ======================================= */
51 class Toolbox : public Gtk::Window
53 friend class studio::StateManager;
55 DialogSettings dialog_settings;
57 Gtk::Tooltips tooltips;
58 Gtk::Button *button_undo;
59 Gtk::Button *button_redo;
61 Gtk::Button *button_eyedrop;
62 Gtk::Button *button_rotoscope;
63 Gtk::Button *button_rotoscope_bline;
64 Gtk::Button *button_rotoscope_polygon;
66 Gtk::Table *tool_table;
68 std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
70 Gtk::Menu *recent_files_menu;
72 Gtk::Menu *dock_dialogs;
76 void on_recent_files_changed();
77 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 void change_state_(const Smach::state_base *state);
83 void change_state(const synfig::String& statename);
85 void update_undo_redo();
87 void refresh() { update_undo_redo(); }
89 void set_active_state(const synfig::String& statename);
91 void add_state(const Smach::state_base *state);
94 void dockable_registered(Dockable* x);
101 }; // END of namespace studio
103 /* === E N D =============================================================== */