gtkmm
3.97.1
|
This represents a cursor. More...
#include <gdkmm/cursor.h>
Public Member Functions | |
Cursor (Cursor&& src) noexcept | |
Cursor& | operator= (Cursor&& src) noexcept |
~Cursor () noexcept override | |
GdkCursor* | gobj () |
Provides access to the underlying C GObject. More... | |
const GdkCursor* | gobj () const |
Provides access to the underlying C GObject. More... | |
GdkCursor* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Glib::RefPtr< Cursor > | get_fallback () |
Returns the fallback for this cursor. More... | |
Glib::RefPtr< const Cursor > | get_fallback () const |
Returns the fallback for this cursor. More... | |
Glib::ustring | get_name () const |
Returns the name of the cursor. More... | |
Glib::RefPtr< Texture > | get_texture () |
Returns the texture for the cursor. More... | |
Glib::RefPtr< const Texture > | get_texture () const |
Returns the texture for the cursor. More... | |
int | get_hotspot_x () const |
Returns the horizontal offset of the hotspot. More... | |
int | get_hotspot_y () const |
Returns the vertical offset of the hotspot. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Cursor > > | property_fallback () const |
Cursor image to fall back to if this cursor cannot be displayed. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_hotspot_x () const |
Horizontal offset of the cursor hotspot. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_hotspot_y () const |
Vertical offset of the cursor hotspot. More... | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const |
Name of this cursor. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Texture > > | property_texture () const |
The texture displayed by this cursor. More... | |
![]() | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
![]() | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
![]() | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) noexcept | |
~trackable () | |
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) noexcept |
void | remove_destroy_notify_callback (notifiable *data) const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< Cursor > | create (const Glib::RefPtr< const Texture >& texture, int hotspot_x, int hotspot_y, const Glib::RefPtr< Cursor >& fallback={}) |
Creates a new cursor from a Gdk::Texture. More... | |
static Glib::RefPtr< Cursor > | create (const Glib::ustring& name, const Glib::RefPtr< Cursor >& fallback={}) |
Creates a new cursor by looking up name in the current cursor theme. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gdk::Cursor > | wrap (GdkCursor* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
![]() | |
typedef void(*)(gpointer data | DestroyNotify) |
![]() | |
typedef internal::func_destroy_notify | func_destroy_notify |
![]() | |
typedef internal::func_destroy_notify | func_destroy_notify |
![]() | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
~Object () noexcept override | |
![]() | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
This represents a cursor.
|
noexcept |
|
overridenoexcept |
|
static |
Creates a new cursor from a Gdk::Texture.
texture | The texture providing the pixel data. |
hotspot_x | The horizontal offset of the “hotspot” of the cursor. |
hotspot_y | The vertical offset of the “hotspot” of the cursor. |
fallback | nullptr or the Gdk::Cursor to fall back to when this one cannot be supported. |
|
static |
Creates a new cursor by looking up name in the current cursor theme.
A recommended set of cursor names that will work across different platforms can be found in the CSS specification:
fallback | nullptr or the Gdk::Cursor to fall back to when this one cannot be supported. |
name | The name of the cursor. |
nullptr
if there is no cursor with the given name. Glib::RefPtr<Cursor> Gdk::Cursor::get_fallback | ( | ) |
Returns the fallback for this cursor.
The fallback will be used if this cursor is not available on a given Gdk::Display.
For named cursors, this can happen when using nonstandard names or when using an incomplete cursor theme. For textured cursors, this can happen when the texture is too large or when the Gdk::Display it is used on does not support textured cursors.
nullptr
to use the default cursor as fallback. Glib::RefPtr<const Cursor> Gdk::Cursor::get_fallback | ( | ) | const |
Returns the fallback for this cursor.
The fallback will be used if this cursor is not available on a given Gdk::Display.
For named cursors, this can happen when using nonstandard names or when using an incomplete cursor theme. For textured cursors, this can happen when the texture is too large or when the Gdk::Display it is used on does not support textured cursors.
nullptr
to use the default cursor as fallback. int Gdk::Cursor::get_hotspot_x | ( | ) | const |
Returns the horizontal offset of the hotspot.
The hotspot indicates the pixel that will be directly above the cursor.
int Gdk::Cursor::get_hotspot_y | ( | ) | const |
Returns the vertical offset of the hotspot.
The hotspot indicates the pixel that will be directly above the cursor.
Glib::ustring Gdk::Cursor::get_name | ( | ) | const |
Returns the name of the cursor.
If the cursor is not a named cursor, nullptr
will be returned and the GdkCursor::property_texture() property will be set.
nullptr
if it is not a named cursor. Glib::RefPtr<Texture> Gdk::Cursor::get_texture | ( | ) |
Returns the texture for the cursor.
If the cursor is a named cursor, nullptr
will be returned and the GdkCursor::property_name() property will be set.
nullptr
if it is a named cursor. Glib::RefPtr<const Texture> Gdk::Cursor::get_texture | ( | ) | const |
Returns the texture for the cursor.
If the cursor is a named cursor, nullptr
will be returned and the GdkCursor::property_name() property will be set.
nullptr
if it is a named cursor.
|
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.
GdkCursor* Gdk::Cursor::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Cursor> > Gdk::Cursor::property_fallback | ( | ) | const |
Cursor image to fall back to if this cursor cannot be displayed.
Glib::PropertyProxy_ReadOnly< int > Gdk::Cursor::property_hotspot_x | ( | ) | const |
Horizontal offset of the cursor hotspot.
Default value: 0
Glib::PropertyProxy_ReadOnly< int > Gdk::Cursor::property_hotspot_y | ( | ) | const |
Vertical offset of the cursor hotspot.
Default value: 0
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gdk::Cursor::property_name | ( | ) | const |
Name of this cursor.
Default value: ""
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Texture> > Gdk::Cursor::property_texture | ( | ) | const |
The texture displayed by this cursor.
|
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. |