gtkmm 4.19.0
|
An icon, used with Gtk::IconTheme. More...
#include <gtkmm/iconpaintable.h>
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
static Glib::RefPtr< IconPaintable > | create (const Glib::RefPtr< Gio::File > & file, int size, int scale=1) |
Creates a Gtk::IconPaintable for a file with a given size and scale. | |
![]() | |
static void | add_interface (GType gtype_implementer) |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gtk::IconPaintable > | wrap (GtkIconPaintable *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
![]() | |
Glib::RefPtr< Gdk::Paintable > | wrap (GdkPaintable *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
An icon, used with Gtk::IconTheme.
|
noexcept |
|
overridenoexcept |
|
static |
Creates a Gtk::IconPaintable
for a file with a given size and scale.
The icon can then be rendered by using it as a Gdk::Paintable
.
file | A Gio::File . |
size | Desired icon size, in application pixels. |
scale | The desired scale. |
Gtk::IconPaintable
containing for the icon. Unref with Glib::object_unref(). Glib::RefPtr< Gio::File > Gtk::IconPaintable::get_file | ( | ) | const |
Glib::ustring Gtk::IconPaintable::get_icon_name | ( | ) | const |
Get the icon name being used for this icon.
When an icon looked up in the icon theme was not available, the icon theme may use fallback icons - either those specified to Gtk::IconTheme::lookup_icon() or the always-available "image-missing". The icon chosen is returned by this function.
If the icon was created without an icon theme, this function returns nullptr
.
Deprecated: 4.20
nullptr
if its not a themed icon.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GtkIconPaintable * Gtk::IconPaintable::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gtk::IconPaintable::is_symbolic | ( | ) | const |
Checks if the icon is symbolic or not.
This currently uses only the file name and not the file contents for determining this. This behaviour may change in the future.
Deprecated: 4.20
|
noexcept |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::File > > Gtk::IconPaintable::property_file | ( | ) | const |
The file representing the icon, if any.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::IconPaintable::property_icon_name | ( | ) | const |
The icon name that was chosen during lookup.
Deprecated: 4.20
Default value: ""
Glib::PropertyProxy< bool > Gtk::IconPaintable::property_is_symbolic | ( | ) |
Whether the icon is symbolic or not.
Deprecated: 4.20
Default value: false
Glib::PropertyProxy_ReadOnly< bool > Gtk::IconPaintable::property_is_symbolic | ( | ) | const |
Whether the icon is symbolic or not.
Deprecated: 4.20
Default value: false
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |