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/arrow.h>
18 #include <gtkmm/box.h>
19 #include <gtkmm/eventbox.h>
20 #include <gtkmm/frame.h>
21 #include <gtkmm/table.h>
22 #include <gtkmm/button.h>
23 #include <gtkmm/label.h>
24 #include <gtkmm/menu.h>
25 #include <gtkmm/optionmenu.h>
26 #include "../previewfillable.h"
28 namespace Inkscape {
29 namespace UI {
30 namespace Widget {
32 class Panel : public Gtk::VBox
33 {
34 public:
35 Panel();
36 virtual ~Panel();
37 Panel(Glib::ustring const &label);
38 Panel(const gchar *prefs_path);
40 void setLabel(Glib::ustring const &label);
41 Glib::ustring const &getLabel() const;
43 virtual void setOrientation( Gtk::AnchorType how );
45 const gchar *_prefs_path;
46 void restorePanelPrefs();
48 protected:
49 Gtk::Box* _getContents() { return &contents; }
50 void _setTargetFillable( PreviewFillable *target );
51 void _regItem( Gtk::MenuItem* item, int group, int id );
53 virtual void _handleAction( int setId, int itemId );
55 Gtk::AnchorType _anchor;
57 private:
58 void init();
59 void bounceCall(int i, int j);
61 void _popper(GdkEventButton* btn);
63 Glib::ustring label;
65 Gtk::HBox topBar;
66 Gtk::VBox rightBar;
67 Gtk::VBox contents;
68 Gtk::Label tabTitle;
69 Gtk::Arrow _tempArrow;
70 Gtk::EventBox menuPopper;
71 Gtk::Button closeButton;
72 Gtk::Menu* menu;
73 PreviewFillable *_fillable;
74 };
76 } // namespace Widget
77 } // namespace UI
78 } // namespace Inkscape
80 #endif // SEEN_INKSCAPE_UI_WIDGET_PANEL_H
82 /*
83 Local Variables:
84 mode:c++
85 c-file-style:"stroustrup"
86 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
87 indent-tabs-mode:nil
88 fill-column:99
89 End:
90 */
91 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :