Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
labelled.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Authors:
4 * Carl Hetherington <inkscape@carlh.net>
5 * Derek P. Moore <derekm@hackunix.org>
6 *
7 * Copyright (C) 2004 Carl Hetherington
8 *
9 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 */
11
12#ifndef INKSCAPE_UI_WIDGET_LABELLED_H
13#define INKSCAPE_UI_WIDGET_LABELLED_H
14
15#include <gtkmm/box.h>
16
17namespace Glib {
18class ustring;
19} // namespace Glib
20
21namespace Gtk {
22class Label;
23} // namespace Gtk
24
25namespace Inkscape::UI::Widget {
26
30class Labelled : public Gtk::Box
31{
32public:
43 Labelled(Glib::ustring const &label, Glib::ustring const &tooltip,
44 Gtk::Widget *widget,
45 Glib::ustring const &icon = {},
46 bool mnemonic = true);
47
48 inline Gtk::Widget const *getWidget() const { return _widget; }
49 inline Gtk::Widget *getWidget() { return _widget; }
50
51 inline Gtk::Label const *getLabel () const { return _label ; }
52 inline Gtk::Label *getLabel () { return _label ; }
53
54private:
55 Gtk::Widget *_widget = nullptr;
56 Gtk::Label *_label = nullptr;
57
58 bool on_mnemonic_activate(bool group_cycling) final;
59};
60
61} // namespace Inkscape::UI::Widget
62
63#endif // INKSCAPE_UI_WIDGET_LABELLED_H
64
65/*
66 Local Variables:
67 mode:c++
68 c-file-style:"stroustrup"
69 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
70 indent-tabs-mode:nil
71 fill-column:99
72 End:
73*/
74// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Adds a label with optional icon to another widget.
Definition labelled.h:31
Gtk::Label const * getLabel() const
Definition labelled.h:51
bool on_mnemonic_activate(bool group_cycling) final
Definition labelled.cpp:50
Gtk::Widget * getWidget()
Definition labelled.h:49
Gtk::Widget const * getWidget() const
Definition labelled.h:48
Glib::ustring label
Definition desktop.h:50
Custom widgets.
Definition desktop.h:126