X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Ftoolbox.h;fp=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Ftoolbox.h;h=31f159b80c78704c77505fd5af1473c65a273cd4;hb=4cb5360f578f79e5d9e234570018d762ea0a964f;hp=0000000000000000000000000000000000000000;hpb=91c14fb028f8cbf78be64623aded885725606f78;p=synfig.git diff --git a/synfig-studio/tags/stable/src/gtkmm/toolbox.h b/synfig-studio/tags/stable/src/gtkmm/toolbox.h new file mode 100644 index 0000000..31f159b --- /dev/null +++ b/synfig-studio/tags/stable/src/gtkmm/toolbox.h @@ -0,0 +1,103 @@ +/* === S Y N F I G ========================================================= */ +/*! \file toolbox.h +** \brief Header File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_TOOLBOX_H +#define __SYNFIG_GTKMM_TOOLBOX_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include "smach.h" +#include +#include "dialogsettings.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class Dockable; +class StateManager; + +class Toolbox : public Gtk::Window +{ + friend class studio::StateManager; + + DialogSettings dialog_settings; + + Gtk::Tooltips tooltips; + Gtk::Button *button_undo; + Gtk::Button *button_redo; + + Gtk::Table *tool_table; + + std::map state_button_map; + + Gtk::Menu *recent_files_menu; + + Gtk::Menu *dock_dialogs; + + bool changing_state_; + + void on_recent_files_changed(); + void on_drop_drag_data_received(const Glib::RefPtr& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time); + + void change_state_(const Smach::state_base *state); + +public: + + void change_state(const synfig::String& statename); + + void update_undo_redo(); + + void refresh() { update_undo_redo(); } + + void set_active_state(const synfig::String& statename); + + void add_state(const Smach::state_base *state); + + + void dockable_registered(Dockable* x); + + Toolbox(); + virtual ~Toolbox(); + +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif