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 void _setTargetFillable( PreviewFillable *target );
48 void _regItem( Gtk::MenuItem* item, int group, int id );
50 virtual void _handleAction( int setId, int itemId );
52 Gtk::AnchorType _anchor;
54 private:
55 void init();
56 void bounceCall(int i, int j);
58 Glib::ustring label;
60 Gtk::HBox topBar;
61 Gtk::Label tabTitle;
62 Gtk::OptionMenu tabButton;
63 Gtk::Menu menu;
64 Gtk::Button closeButton;
65 PreviewFillable *_fillable;
66 };
68 } // namespace Widget
69 } // namespace UI
70 } // namespace Inkscape
72 #endif // SEEN_INKSCAPE_UI_WIDGET_PANEL_H
74 /*
75 Local Variables:
76 mode:c++
77 c-file-style:"stroustrup"
78 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
79 indent-tabs-mode:nil
80 fill-column:99
81 End:
82 */
83 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :