summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/entry.h
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-03-23 02:53:58 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-03-23 02:53:58 +0000
commit924e671a1e5d76c1d25d4fcad9d0e9f015dc394e (patch)
treeb5edc420bece6f3a7227bdb1009af3fea51388b9 /src/ui/widget/entry.h
parentUI. Patch for Bug #666370 (Not all units in the Object Transform dialog are t... (diff)
downloadinkscape-924e671a1e5d76c1d25d4fcad9d0e9f015dc394e.tar.gz
inkscape-924e671a1e5d76c1d25d4fcad9d0e9f015dc394e.zip
Fix for 909328 : Dockable Find & Replace dialog
(bzr r11117)
Diffstat (limited to 'src/ui/widget/entry.h')
-rw-r--r--src/ui/widget/entry.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h
index d332dde1b..be7c8b450 100644
--- a/src/ui/widget/entry.h
+++ b/src/ui/widget/entry.h
@@ -11,8 +11,10 @@
#define INKSCAPE_UI_WIDGET_ENTRY__H
#include "labelled.h"
+#include <gtkmm.h>
#include <gtkmm/entry.h>
+#include <gtkmm/comboboxtext.h>
namespace Inkscape {
namespace UI {
@@ -35,6 +37,50 @@ public:
Gtk::Entry* getEntry() {return (Gtk::Entry*)(_widget);};
};
+class ComboBoxText : public Labelled
+{
+public:
+ ComboBoxText( Glib::ustring const &label,
+ Glib::ustring const &tooltip,
+ Glib::ustring const &suffix = "",
+ Glib::ustring const &icon = "",
+ bool mnemonic = true);
+
+ Gtk::ComboBoxText* getWidget() { return (Gtk::ComboBoxText *)_widget; };
+ Gtk::Entry* getEntry() { return (Gtk::Entry *)getWidget()->get_child(); };
+ Glib::ustring get_text() { return getEntry()->get_text(); };
+ void prepend_text(const Glib::ustring& text) {
+#if WITH_GTKMM_2_24
+ getWidget()->prepend(text);
+#else
+ getWidget()->prepend_text(text);
+#endif
+ };
+ void append_text(const Glib::ustring& text) {
+#if WITH_GTKMM_2_24
+ getWidget()->append(text);
+#else
+ getWidget()->append_text(text);
+#endif
+ };
+ void insert_text(gint position, const Glib::ustring& text) {
+#if WITH_GTKMM_2_24
+ getWidget()->insert(position, text);
+#else
+ getWidget()->insert_text(position, text);
+#endif
+ };
+ void remove_text(const Glib::ustring& text) { getWidget()->remove_text(text); };
+ void remove_all() {
+#if WITH_GTKMM_2_24
+ getWidget()->remove_all();
+#else
+ getWidget()->clear_items();
+#endif
+ };
+
+};
+
} // namespace Widget
} // namespace UI
} // namespace Inkscape