diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/ui/widget/toolbox.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/ui/widget/toolbox.h')
| -rw-r--r-- | src/ui/widget/toolbox.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/ui/widget/toolbox.h b/src/ui/widget/toolbox.h new file mode 100644 index 000000000..9c4e18909 --- /dev/null +++ b/src/ui/widget/toolbox.h @@ -0,0 +1,73 @@ +/** + * \brief Toolbox Widget - A detachable toolbar for buttons and other widgets. + * + * Author: + * Derek P. Moore <derekm@hackunix.org> + * + * Copyright (C) 2004 Derek P. Moore + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#ifndef INKSCAPE_UI_WIDGET_TOOLBOX_H +#define INKSCAPE_UI_WIDGET_TOOLBOX_H + +#include <gtkmm/toolbar.h> +#include <gtkmm/menu.h> +#include <gtkmm/action.h> +#include <gtkmm/uimanager.h> +#include "handlebox.h" + +namespace Inkscape { +namespace UI { +namespace Widget { + +class Toolbox : public HandleBox +{ +public: + Toolbox(Gtk::Toolbar *toolbar, + Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL); + Toolbox(Gtk::Toolbar *toolbar, + Gtk::ToolbarStyle style, + Gtk::Orientation orientation = Gtk::ORIENTATION_HORIZONTAL); + + Gtk::Toolbar& get_toolbar(); + +protected: + Gtk::Menu *_context_menu; + + Glib::RefPtr<Gtk::ActionGroup> _action_grp; + Glib::RefPtr<Gtk::ActionGroup> _detach_grp; + Glib::RefPtr<Gtk::UIManager> _ui_mgr; + + void init_actions(); + void init_orientation(Gtk::Orientation const &orientation); + void init_style(Gtk::ToolbarStyle const &style); + bool on_popup_context_menu(int x, int y, int button); + void on_child_attached(Gtk::Widget *widget); + void on_child_detached(Gtk::Widget *widget); + void on_change_style_icons(); + void on_change_style_text(); + void on_change_style_both(); + void on_change_style_both_horiz(); + void on_change_orient_horiz(); + void on_change_orient_vert(); + void on_show_arrow(); +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif // INKSCAPE_UI_WIDGET_TOOLBOX_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
