Inkscape
Vector Graphics Editor
text.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 * Maximilian Albert <maximilian.albert@gmail.com>
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_TEXT_H
13#define INKSCAPE_UI_WIDGET_TEXT_H
14
15#include "labelled.h"
16
17namespace Gtk {
18class Entry;
19} // namespace Gtk
20
21namespace Inkscape::UI::Widget {
22
26class Text : public Labelled
27{
28public:
29
40 Text(Glib::ustring const &label,
41 Glib::ustring const &tooltip,
42 Glib::ustring const &icon = {},
43 bool mnemonic = true);
44
48 Glib::ustring const getText() const;
49
53 void setText(Glib::ustring const text);
54
55 void update();
56
60 Glib::SignalProxy<void()> signal_activate();
61
62 bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
63 // if a callback checks it, it must reset it back to false
64
65private:
66 Gtk::Entry const &getEntry() const;
67 Gtk::Entry &getEntry() ;
68};
69
70} // namespace Inkscape::UI::Widget
71
72#endif // INKSCAPE_UI_WIDGET_TEXT_H
73
74/*
75 Local Variables:
76 mode:c++
77 c-file-style:"stroustrup"
78 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
79 indent-tabs-mode:nil
80 fill-column:99
81 End:
82*/
83// 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
A labelled text box, with optional icon, for entering arbitrary number values.
Definition: text.h:27
void setText(Glib::ustring const text)
Sets the text of the text entry.
Definition: text.cpp:31
Gtk::Entry const & getEntry() const
Definition: text.cpp:42
Glib::SignalProxy< void()> signal_activate()
Signal raised when the spin button's value changes.
Definition: text.cpp:37
Glib::ustring const getText() const
Get the text in the entry.
Definition: text.cpp:26
Text(Glib::ustring const &label, Glib::ustring const &tooltip, Glib::ustring const &icon={}, bool mnemonic=true)
Construct a Text Widget.
Definition: text.cpp:18
Definition: desktop.h:51
Custom widgets.
Definition: desktop.h:127