Code

Translations. French translation minor update.
[inkscape.git] / src / ui / widget / labelled.h
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     Gtk::Widget const *getWidget() const;
40     Gtk::Label const *getLabel() const;
42     void setLabelText(const Glib::ustring &str) { _label->set_text(str); };
44 protected:
45     Gtk::Widget  *_widget;
46     Gtk::Label   *_label;
47     Gtk::Label   *_suffix;
48     Gtk::Widget  *_icon;
49     Gtk::Tooltips _tooltips;
50 };
52 } // namespace Widget
53 } // namespace UI
54 } // namespace Inkscape
56 #endif // INKSCAPE_UI_WIDGET_LABELLED_H
58 /*
59   Local Variables:
60   mode:c++
61   c-file-style:"stroustrup"
62   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
63   indent-tabs-mode:nil
64   fill-column:99
65   End:
66 */
67 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :