1 /**
2 * \brief Generic Panel widget - A generic dockable container.
3 *
4 * Authors:
5 * Bryce Harrington <bryce@bryceharrington.org>
6 * Jon A. Cruz <jon@joncruz.org>
7 *
8 * Copyright (C) 2004 Bryce Harrington
9 * Copyright (C) 2005 Jon A. Cruz
10 *
11 * Released under GNU GPL. Read the file 'COPYING' for more information.
12 */
14 #ifndef SEEN_INKSCAPE_UI_WIDGET_PANEL_H
15 #define SEEN_INKSCAPE_UI_WIDGET_PANEL_H
17 #include <gtkmm/box.h>
18 #include <gtkmm/frame.h>
19 #include <gtkmm/table.h>
20 #include <gtkmm/button.h>
21 #include <gtkmm/label.h>
22 #include <gtkmm/menu.h>
23 #include <gtkmm/optionmenu.h>
24 #include "../previewfillable.h"
26 namespace Inkscape {
27 namespace UI {
28 namespace Widget {
30 class Panel : public Gtk::VBox
31 {
32 public:
33 Panel();
34 virtual ~Panel();
35 Panel(Glib::ustring const &label);
36 Panel(const gchar *prefs_path);
38 void setLabel(Glib::ustring const &label);
39 Glib::ustring const &getLabel() const;
41 virtual void setOrientation( Gtk::AnchorType how );
43 const gchar *_prefs_path;
44 void restorePanelPrefs();
46 protected:
47 Gtk::Box* _getContents() { return &contents; }
48 void _setTargetFillable( PreviewFillable *target );
49 void _regItem( Gtk::MenuItem* item, int group, int id );
51 virtual void _handleAction( int setId, int itemId );
53 Gtk::AnchorType _anchor;
55 private:
56 void init();
57 void bounceCall(int i, int j);
59 Glib::ustring label;
61 Gtk::HBox topBar;
62 Gtk::VBox rightBar;
63 Gtk::VBox contents;
64 Gtk::Label tabTitle;
65 Gtk::OptionMenu tabButton;
66 Gtk::Menu menu;
67 Gtk::Button closeButton;
68 PreviewFillable *_fillable;
69 };
71 } // namespace Widget
72 } // namespace UI
73 } // namespace Inkscape
75 #endif // SEEN_INKSCAPE_UI_WIDGET_PANEL_H
77 /*
78 Local Variables:
79 mode:c++
80 c-file-style:"stroustrup"
81 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
82 indent-tabs-mode:nil
83 fill-column:99
84 End:
85 */
86 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :