summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget/Makefile_insert2
-rw-r--r--src/ui/widget/entry.cpp35
-rw-r--r--src/ui/widget/entry.h42
3 files changed, 79 insertions, 0 deletions
diff --git a/src/ui/widget/Makefile_insert b/src/ui/widget/Makefile_insert
index 2ef0f8f41..d84cb2f97 100644
--- a/src/ui/widget/Makefile_insert
+++ b/src/ui/widget/Makefile_insert
@@ -16,6 +16,8 @@ ui_widget_libuiwidget_a_SOURCES = \
ui/widget/combo-text.h \
ui/widget/entity-entry.cpp \
ui/widget/entity-entry.h \
+ ui/widget/entry.cpp \
+ ui/widget/entry.h \
ui/widget/handlebox.cpp \
ui/widget/handlebox.h \
ui/widget/icon-widget.cpp \
diff --git a/src/ui/widget/entry.cpp b/src/ui/widget/entry.cpp
new file mode 100644
index 000000000..73a5edac1
--- /dev/null
+++ b/src/ui/widget/entry.cpp
@@ -0,0 +1,35 @@
+/** \file
+ *
+ * \brief Helperclass for Gtk::Entry widgets
+ *
+ * Authors:
+ * Johan Engelen <goejendaagh@zonnet.nl>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL. Read the file 'COPYING' for more information
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "entry.h"
+
+namespace Inkscape {
+namespace UI {
+namespace Widget {
+
+Entry::Entry(Glib::ustring const &label, Glib::ustring const &tooltip)
+ : _label(label, true), _entry(), _tooltips()
+{
+ pack_start(_label);
+ pack_start(_entry);
+
+ _tooltips.set_tip(*this, tooltip);
+}
+
+} // namespace Widget
+} // namespace UI
+} // namespace Inkscape
+
diff --git a/src/ui/widget/entry.h b/src/ui/widget/entry.h
new file mode 100644
index 000000000..3ed4d661e
--- /dev/null
+++ b/src/ui/widget/entry.h
@@ -0,0 +1,42 @@
+/** \file
+ *
+ * \brief Helperclass for Gtk::Entry widgets
+ *
+ * Authors:
+ * Johan Engelen <goejendaagh@zonnet.nl>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL. Read the file 'COPYING' for more information.
+ */
+
+#ifndef INKSCAPE_UI_WIDGET_ENTRY__H
+#define INKSCAPE_UI_WIDGET_ENTRY__H
+
+#include <gtkmm/entry.h>
+#include <gtkmm/tooltips.h>
+#include <gtkmm/label.h>
+#include <gtkmm/box.h>
+
+namespace Inkscape {
+namespace UI {
+namespace Widget {
+
+class Entry : public Gtk::HBox
+{
+public:
+ Entry(Glib::ustring const &label, Glib::ustring const &tooltip);
+
+ // TO DO: add methods to access _entry
+
+protected:
+ Gtk::Tooltips _tooltips;
+ Gtk::Label _label;
+ Gtk::Entry _entry;
+};
+
+} // namespace Widget
+} // namespace UI
+} // namespace Inkscape
+
+#endif // INKSCAPE_UI_WIDGET_ENTRY__H