| 1 |
/* Copyright (C) 2010 The gtkmm Development Team |
| 2 |
* |
| 3 |
* This library is free software; you can redistribute it and/or |
| 4 |
* modify it under the terms of the GNU Lesser General Public |
| 5 |
* License as published by the Free Software Foundation; either |
| 6 |
* version 2.1 of the License, or (at your option) any later version. |
| 7 |
* |
| 8 |
* This library is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
* Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public |
| 14 |
* License along with this library; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
_CONFIGINCLUDE(gtkmmconfig.h) |
| 18 |
|
| 19 |
#include <giomm/emblemedicon.h> |
| 20 |
#include <gtkmm/stylecontext.h> |
| 21 |
|
| 22 |
_DEFS(gtkmm,gtk) |
| 23 |
_PINCLUDE(giomm/private/emblemedicon_p.h) |
| 24 |
|
| 25 |
#m4 _PUSH(SECTION_CC_PRE_INCLUDES) |
| 26 |
#undef GTK_DISABLE_DEPRECATED |
| 27 |
#define GDK_DISABLE_DEPRECATION_WARNINGS 1 |
| 28 |
#m4 _POP() |
| 29 |
|
| 30 |
_IS_DEPRECATED // This whole file is deprecated. |
| 31 |
|
| 32 |
namespace Gtk |
| 33 |
{ |
| 34 |
|
| 35 |
/** A Gio::Icon that allows numbered emblems. |
| 36 |
* |
| 37 |
* Gtk::NumerableIcon is a subclass of Gio::EmblemedIcon that can show a number or short string as an emblem. |
| 38 |
* The number can be overlayed on top of another emblem, if desired. |
| 39 |
* |
| 40 |
* It supports theming by taking font and color information from a provided StyleContext. See set_style_context(). |
| 41 |
* |
| 42 |
* @newin{3,0} |
| 43 |
* @deprecated No replacement available. |
| 44 |
*/ |
| 45 |
class GTKMM_API NumerableIcon : public Gio::EmblemedIcon |
| 46 |
{ |
| 47 |
_CLASS_GOBJECT(NumerableIcon, GtkNumerableIcon, GTK_NUMERABLE_ICON, Gio::EmblemedIcon, GEmblemedIcon, , , GTKMM_API) |
| 48 |
|
| 49 |
protected: |
| 50 |
_WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_new) |
| 51 |
|
| 52 |
_WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& style_context), gtk_numerable_icon_new_with_style_context) |
| 53 |
|
| 54 |
public: |
| 55 |
_WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon) |
| 56 |
|
| 57 |
_WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& context) |
| 58 |
|
| 59 |
_WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_numerable_icon_get_style_context, refreturn) |
| 60 |
_WRAP_METHOD(Glib::RefPtr<const StyleContext> get_style_context() const, gtk_numerable_icon_get_style_context, refreturn, constversion) |
| 61 |
|
| 62 |
_WRAP_METHOD(void set_style_context(const Glib::RefPtr<StyleContext>& style), gtk_numerable_icon_set_style_context) |
| 63 |
|
| 64 |
_WRAP_METHOD(int get_count() const, gtk_numerable_icon_get_count) |
| 65 |
_WRAP_METHOD(void set_count(int count), gtk_numerable_icon_set_count) |
| 66 |
|
| 67 |
_WRAP_METHOD(Glib::ustring get_label() const, gtk_numerable_icon_get_label) |
| 68 |
_WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_numerable_icon_set_label) |
| 69 |
|
| 70 |
_WRAP_METHOD(void set_background_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_set_background_gicon) |
| 71 |
|
| 72 |
_WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_background_gicon(), gtk_numerable_icon_get_background_gicon, refreturn) |
| 73 |
_WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_background_gicon() const, gtk_numerable_icon_get_background_gicon, refreturn, constversion) |
| 74 |
|
| 75 |
_WRAP_METHOD(void set_background_icon_name(const Glib::ustring& icon_name), gtk_numerable_icon_set_background_icon_name) |
| 76 |
_WRAP_METHOD(Glib::ustring get_background_icon_name() const, gtk_numerable_icon_get_background_icon_name) |
| 77 |
|
| 78 |
_WRAP_PROPERTY("count", int) |
| 79 |
_WRAP_PROPERTY("label", Glib::ustring) |
| 80 |
_WRAP_PROPERTY("style-context", Glib::RefPtr<StyleContext>) |
| 81 |
_WRAP_PROPERTY("background-icon", Glib::RefPtr<Gio::Icon>) |
| 82 |
_WRAP_PROPERTY("background-icon-name", Glib::ustring) |
| 83 |
}; |
| 84 |
|
| 85 |
} // namespace Gtk |