[gtkmm] Added Gtk::SearchEntry.



commit 5e8b2385f42291463a1914c2f0b8fe86615a78ff
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jul 11 09:29:54 2012 +0200

    Added Gtk::SearchEntry.
    
    * gtk/gtkmm.h:
    * gtk/src/filelist.am:
    * gtk/src/searchentry.[hg|ccg]: A new wrapper of GtkSearchEntry.

 ChangeLog               |    8 +++++++
 gtk/gtkmm.h             |    1 +
 gtk/src/filelist.am     |    1 +
 gtk/src/searchentry.ccg |   23 ++++++++++++++++++++
 gtk/src/searchentry.hg  |   52 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 85 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dfaf786..ad94c53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-11  Murray Cumming  <murrayc murrayc com>
+
+	Added Gtk::SearchEntry.
+
+	* gtk/gtkmm.h:
+	* gtk/src/filelist.am:
+	* gtk/src/searchentry.[hg|ccg]: A new wrapper of GtkSearchEntry.
+
 2012-07-02  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Fix wrap_init() for Quartz (MacOS).
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index f25f400..4a86ae4 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -222,6 +222,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/scale.h>
 #include <gtkmm/scrollbar.h>
 #include <gtkmm/scrolledwindow.h>
+#include <gtkmm/searchentry.h>
 #include <gtkmm/separator.h>
 #include <gtkmm/separatormenuitem.h>
 #include <gtkmm/separatortoolitem.h>
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 466f40e..4a67c8e 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -139,6 +139,7 @@ gtkmm_files_any_hg =		\
 	scrollable.hg		\
 	scrollbar.hg		\
 	scrolledwindow.hg	\
+	searchentry.hg		\
 	selectiondata.hg	\
 	separator.hg		\
 	separatormenuitem.hg	\
diff --git a/gtk/src/searchentry.ccg b/gtk/src/searchentry.ccg
new file mode 100644
index 0000000..3a1b481
--- /dev/null
+++ b/gtk/src/searchentry.ccg
@@ -0,0 +1,23 @@
+/* Copyright 2012 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+}
diff --git a/gtk/src/searchentry.hg b/gtk/src/searchentry.hg
new file mode 100644
index 0000000..b278434
--- /dev/null
+++ b/gtk/src/searchentry.hg
@@ -0,0 +1,52 @@
+/* Copyright (C) 2012 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <gtkmm/entry.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/entry_p.h)
+
+namespace Gtk
+{
+
+_WRAP_ENUM(SearchEntryIconPosition, GtkSearchEntryIconPosition)
+
+/** This is a subclass of Gtk::Entry that has
+ * been tailored for use as a search entry.
+ *
+ * It will show an inactive symbolic "find" icon when the
+ * search entry is empty, and a symbolic "clear" icon when
+ * there is text. Clicking on the "clear" icon will empty
+ * the search entry.
+ *
+ * Note that the search/clear icon is shown using a secondary
+ * icon, and thus does not work if you are using the secondary
+ * icon position for some other purpose.
+ *
+ * @ingroup Widgets
+ * @newin{3,6}
+ */
+class SearchEntry
+: public Entry
+{
+  _CLASS_GTKOBJECT(SearchEntry, GtkSearchEntry, GTK_SEARCH_ENTRY, Gtk::Entry,GtkEntry)
+public:
+
+  _CTOR_DEFAULT
+};
+
+} /* namespace Gtk */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]