1823aeef291c138678803d09530bbeb62c78d033
1 /**
2 * \brief Labelled Widget - Adds a label with optional icon or suffix to
3 * another widget.
4 *
5 * Authors:
6 * Carl Hetherington <inkscape@carlh.net>
7 * Derek P. Moore <derekm@hackunix.org>
8 *
9 * Copyright (C) 2004 Carl Hetherington
10 *
11 * Released under GNU GPL. Read the file 'COPYING' for more information.
12 */
14 #ifndef INKSCAPE_UI_WIDGET_LABELLED_H
15 #define INKSCAPE_UI_WIDGET_LABELLED_H
17 #include <gtkmm/box.h>
18 #include <gtkmm/label.h>
19 #include <gtkmm/image.h>
20 #include <gtkmm/tooltips.h>
22 namespace Inkscape {
23 namespace UI {
24 namespace Widget {
26 class Labelled : public Gtk::HBox
27 {
28 public:
29 Labelled(Glib::ustring const &label, Glib::ustring const &tooltip,
30 Gtk::Widget *widget,
31 Glib::ustring const &suffix = "",
32 Glib::ustring const &icon = "",
33 bool mnemonic = true);
35 /**
36 * Allow the setting of the width of the labelled widget
37 */
38 void setWidgetSizeRequest(int width, int height);
39 const Gtk::Widget* const getWidget() const;
40 const Gtk::Label* const getLabel() const;
42 protected:
43 Gtk::Widget *_widget;
44 Gtk::Label *_label;
45 Gtk::Label *_suffix;
46 Gtk::Widget *_icon;
47 Gtk::Tooltips _tooltips;
48 };
50 } // namespace Widget
51 } // namespace UI
52 } // namespace Inkscape
54 #endif // INKSCAPE_UI_WIDGET_LABELLED_H
56 /*
57 Local Variables:
58 mode:c++
59 c-file-style:"stroustrup"
60 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61 indent-tabs-mode:nil
62 fill-column:99
63 End:
64 */
65 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :