Code

search and reset buttons added to ocal related features. fixed signals in import...
[inkscape.git] / src / ui / widget / panel.h
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 <vector>
18 #include <gtkmm/arrow.h>
19 #include <gtkmm/box.h>
20 #include <gtkmm/eventbox.h>
21 #include <gtkmm/frame.h>
22 #include <gtkmm/table.h>
23 #include <gtkmm/button.h>
24 #include <gtkmm/label.h>
25 #include <gtkmm/menu.h>
26 #include <gtkmm/optionmenu.h>
27 #include "../previewfillable.h"
29 namespace Inkscape {
30 namespace UI {
31 namespace Widget {
33 class Panel : public Gtk::VBox
34 {
35 public:
36     Panel();
37     virtual ~Panel();
38     Panel(Glib::ustring const &label, gchar const *prefs_path = 0, bool menuDesired = false );
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 );
54     bool _menuDesired;
56     Gtk::AnchorType _anchor;
58 private:
59     void init();
60     void bounceCall(int i, int j);
62     void _popper(GdkEventButton* btn);
63     void _wrapToggled(Gtk::CheckMenuItem* toggler);
65     Glib::ustring   label;
67     Gtk::HBox       topBar;
68     Gtk::VBox       rightBar;
69     Gtk::VBox       contents;
70     Gtk::Label      tabTitle;
71     Gtk::Arrow      _tempArrow;
72     Gtk::EventBox   menuPopper;
73     Gtk::Button     closeButton;
74     Gtk::Menu*       menu;
75     std::vector<Gtk::Widget*> nonHorizontal;
76     std::vector<Gtk::Widget*> nonVertical;
77     PreviewFillable *_fillable;
78 };
80 } // namespace Widget
81 } // namespace UI
82 } // namespace Inkscape
84 #endif // SEEN_INKSCAPE_UI_WIDGET_PANEL_H
86 /*
87   Local Variables:
88   mode:c++
89   c-file-style:"stroustrup"
90   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
91   indent-tabs-mode:nil
92   fill-column:99
93   End:
94 */
95 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :