[gtkmm] Added NumerableIcon.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Added NumerableIcon.
- Date: Sun, 16 Jan 2011 22:09:40 +0000 (UTC)
commit cbefbb5f439d61f47d098ac9a9dbce26ab737922
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Jan 16 23:01:00 2011 +0100
Added NumerableIcon.
* gtk/src/numerableicon.[hg|ccg]: Added NumerableIcon.
* gtk/src/filelist.am: Mentioned the new files.
* gtk/gtkmm.h: Include the new header.
ChangeLog | 8 +++
gtk/gtkmm.h | 1 +
gtk/src/filelist.am | 1 +
gtk/src/gtk_signals.defs | 56 ++++++++++++++++++++++
gtk/src/numerableicon.ccg | 18 +++++++
gtk/src/numerableicon.hg | 72 +++++++++++++++++++++++++++++
tools/extra_defs_gen/generate_defs_gtk.cc | 1 +
7 files changed, 157 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f0eabe3..e354365 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-01-16 Murray Cumming <murrayc murrayc com>
+
+ Added NumerableIcon.
+
+ * gtk/src/numerableicon.[hg|ccg]: Added NumerableIcon.
+ * gtk/src/filelist.am: Mentioned the new files.
+ * gtk/gtkmm.h: Include the new header.
+
2011-01-15 Murray Cumming <murrayc murrayc com>
ListViewText: Rename methods to be consistent with ComboBoxText.
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 76b22ef..56a44da 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -171,6 +171,7 @@ extern const int gtkmm_micro_version;
#include <gtkmm/messagedialog.h>
#include <gtkmm/misc.h>
#include <gtkmm/notebook.h>
+#include <gtkmm/numerableicon.h>
#include <gtkmm/object.h>
#include <gtkmm/offscreenwindow.h>
#include <gtkmm/paned.h>
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 47cb5b1..10d23fb 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -101,6 +101,7 @@ gtkmm_files_any_hg = \
messagedialog.hg \
misc.hg \
notebook.hg \
+ numerableicon.hg \
offscreenwindow.hg \
orientable.hg \
pagesetup.hg \
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 1fd4041..07c8de4 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -27833,6 +27833,62 @@
(construct-only #f)
)
+;; From GtkNumerableIcon
+
+(define-property gicon
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamObject")
+ (docs "The GIcon to attach emblems to")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property count
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamInt")
+ (docs "The count of the emblem currently displayed")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property label
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamString")
+ (docs "The label to be displayed over the icon")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property style-context
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamObject")
+ (docs "The style context to theme the icon appearance")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property background-icon
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamObject")
+ (docs "The icon for the number emblem background")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property background-icon-name
+ (of-object "GtkNumerableIcon")
+ (prop-type "GParamString")
+ (docs "The icon name for the number emblem background")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GtkOffscreenWindow
(define-property name
diff --git a/gtk/src/numerableicon.ccg b/gtk/src/numerableicon.ccg
new file mode 100644
index 0000000..f41afe9
--- /dev/null
+++ b/gtk/src/numerableicon.ccg
@@ -0,0 +1,18 @@
+/* Copyright (C) 2010 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtk.h>
diff --git a/gtk/src/numerableicon.hg b/gtk/src/numerableicon.hg
new file mode 100644
index 0000000..d3f5d47
--- /dev/null
+++ b/gtk/src/numerableicon.hg
@@ -0,0 +1,72 @@
+/* Copyright (C) 2010 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_CONFIGINCLUDE(gtkmmconfig.h)
+
+#include <giomm/emblemedicon.h>
+#include <gtkmm/stylecontext.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(giomm/private/emblemedicon_p.h)
+
+namespace Gtk
+{
+
+/** TODO
+ * @newin{3,0}
+ */
+class NumerableIcon : public Gio::EmblemedIcon
+{
+ _CLASS_GOBJECT(NumerableIcon, GtkNumerableIcon, GTK_NUMERABLE_ICON, Gio::EmblemedIcon, GEmblemedIcon)
+
+protected:
+ _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_new)
+
+ _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& style_context), gtk_numerable_icon_new_with_style_context)
+
+public:
+ _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon)
+
+ _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& context)
+
+ _WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_numerable_icon_get_style_context, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const StyleContext> get_style_context() const, gtk_numerable_icon_get_style_context, refreturn, constversion)
+
+ _WRAP_METHOD(void set_style_context(const Glib::RefPtr<StyleContext>& style), gtk_numerable_icon_set_style_context)
+
+ _WRAP_METHOD(int get_count() const, gtk_numerable_icon_get_count)
+ _WRAP_METHOD(void set_count(int count), gtk_numerable_icon_set_count)
+
+ _WRAP_METHOD(Glib::ustring get_label() const, gtk_numerable_icon_get_label)
+ _WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_numerable_icon_set_label)
+
+ _WRAP_METHOD(void set_background_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_set_background_gicon)
+
+ _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_background_gicon(), gtk_numerable_icon_get_background_gicon, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_background_gicon() const, tk_numerable_icon_get_background_gicon, refreturn, constversion)
+
+ _WRAP_METHOD(void set_background_icon_name(const Glib::ustring& icon_name), gtk_numerable_icon_set_background_icon_name)
+ _WRAP_METHOD(Glib::ustring get_background_icon_name() const, gtk_numerable_icon_get_background_icon_name)
+
+ _WRAP_PROPERTY("count", int)
+ _WRAP_PROPERTY("label", Glib::ustring)
+ _WRAP_PROPERTY("style-context", Glib::RefPtr<StyleContext>)
+ _WRAP_PROPERTY("background-icon", Glib::RefPtr<Gio::Icon>)
+ _WRAP_PROPERTY("background-icon-name", Glib::ustring)
+};
+
+} // namespace Gtk
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 46be1dd..e9a5069 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -129,6 +129,7 @@ int main(int argc, char** argv)
<< get_defs( GTK_TYPE_MESSAGE_DIALOG )
<< get_defs( GTK_TYPE_MISC )
<< get_defs( GTK_TYPE_NOTEBOOK )
+ << get_defs( GTK_TYPE_NUMERABLE_ICON )
<< get_defs( GTK_TYPE_OFFSCREEN_WINDOW )
<< get_defs( GTK_TYPE_ORIENTABLE )
<< get_defs( GTK_TYPE_PANED )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]