diff options
| author | gustav_b <gustav_b@users.sourceforge.net> | 2007-08-29 21:27:07 +0000 |
|---|---|---|
| committer | gustav_b <gustav_b@users.sourceforge.net> | 2007-08-29 21:27:07 +0000 |
| commit | 731f2b5adbb6f9e9fc853a6506c695fd2fcec320 (patch) | |
| tree | 6e7775c500ffc41d1376d7496c9334840b0f065f /src/ui/widget/dock.h | |
| parent | Don't snap node handles to the parent path, plus a small string change (diff) | |
| download | inkscape-731f2b5adbb6f9e9fc853a6506c695fd2fcec320.tar.gz inkscape-731f2b5adbb6f9e9fc853a6506c695fd2fcec320.zip | |
Dockable dialogs patch applied
(https://sourceforge.net/tracker/?func=detail&atid=604308&aid=1688508&group_id=93438)
(bzr r3613)
Diffstat (limited to 'src/ui/widget/dock.h')
| -rw-r--r-- | src/ui/widget/dock.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h new file mode 100644 index 000000000..be0c4ef1d --- /dev/null +++ b/src/ui/widget/dock.h @@ -0,0 +1,97 @@ +/** + * \brief A desktop dock pane to dock dialogs, a custom wrapper around gdl-dock. + * + * Author: + * Gustav Broberg <broberg@kth.se> + * + * Copyright (C) 2007 Authors + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#ifndef INKSCAPE_UI_WIDGET_DOCK_H +#define INKSCAPE_UI_WIDGET_DOCK_H + +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/box.h> +#include <gtkmm/paned.h> + +#include <list> + +#include "ui/widget/dock-item.h" + +#include "libgdl/libgdl.h" + +namespace Inkscape { +namespace UI { +namespace Widget { + +class Dock { + +public: + + Dock(Gtk::Orientation orientation=Gtk::ORIENTATION_VERTICAL); + ~Dock(); + + void addItem(DockItem& item, DockItem::Placement placement); + + Gtk::Widget& getWidget(); //< return the top widget + Gtk::Paned *getParentPaned(); + + Gtk::Paned *getPaned(); + + bool isEmpty() const; //< true iff none of the dock's items are in state != UNATTACHED + bool hasIconifiedItems() const; + + Glib::SignalProxy0<void> signal_layout_changed(); + + void hide(); + void show(); + + /** Toggle size of dock between the previous dimensions and the ones sent as parameters */ + void toggleDockable(int width=0, int height=0); + +protected: + + std::list<const DockItem *> _dock_items; //< added dock items + + /** Interface widgets, will be packed like + * _scrolled_window -> (_dock_box -> (_paned -> (_dock -> _filler) | _dock_bar)) + */ + Gtk::Box *_dock_box; + Gtk::Paned* _paned; + GdlDock *_gdl_dock; + GdlDockBar *_gdl_dock_bar; + Gtk::VBox _filler; + Gtk::ScrolledWindow *_scrolled_window; + + /** Internal signal handlers */ + void _onLayoutChanged(); + + void _onFoo(); + + /** GdlDock signal proxy structures */ + static const Glib::SignalProxyInfo _signal_layout_changed_proxy; + + /** Standard widths */ + static const int _default_empty_width; + static const int _default_dock_bar_width; +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif //INKSCAPE_UI_DIALOG_BEHAVIOUR_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 + |
