1 /**
2 * \brief Text Widget - A labelled text box, with optional icon or
3 * suffix, for entering arbitrary number values.
4 *
5 * Authors:
6 * Carl Hetherington <inkscape@carlh.net>
7 * Maximilian Albert <maximilian.albert@gmail.com>
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_TEXT_H
15 #define INKSCAPE_UI_WIDGET_TEXT_H
17 #include <gtkmm/adjustment.h>
18 #include <gtkmm/spinbutton.h>
20 #include "labelled.h"
22 namespace Inkscape {
23 namespace UI {
24 namespace Widget {
26 class Text : public Labelled
27 {
28 public:
29 Text(Glib::ustring const &label,
30 Glib::ustring const &tooltip,
31 Glib::ustring const &suffix = "",
32 Glib::ustring const &icon = "",
33 bool mnemonic = true);
35 const char* getText() const;
37 void setText(const char* text);
39 void update();
41 Glib::SignalProxy0<void> signal_activate();
43 bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
44 // if a callback checks it, it must reset it back to false
45 };
47 } // namespace Widget
48 } // namespace UI
49 } // namespace Inkscape
51 #endif // INKSCAPE_UI_WIDGET_TEXT_H
53 /*
54 Local Variables:
55 mode:c++
56 c-file-style:"stroustrup"
57 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
58 indent-tabs-mode:nil
59 fill-column:99
60 End:
61 */
62 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :