gtkmm 4.18.0
|
Accessible interface. More...
#include <gtkmm/accessible.h>
Static Public Member Functions | |
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. | |
Protected Member Functions | |
Accessible () | |
You should derive from this class to use it. | |
![]() | |
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) |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gtk::Accessible > | wrap (GtkAccessible *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
Accessible interface.
Gtk::Accessible provides an interface for describing a UI element, like a Gtk::Widget, in a way that can be consumed by Assistive Technologies, or “AT”. Every accessible implementation has:
The role cannot be changed after instantiating a Gtk::Accessible implementation.
The attributes are updated every time a UI element's state changes in a way that should be reflected by assistive technologies. For instance, if a Gtk::Widget visibility changes, the Gtk::Accessible::State::HIDDEN state will also change to reflect Gtk::Widget::property_visible().
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
void Gtk::Accessible::announce | ( | const Glib::ustring & | message, |
AnnouncementPriority | priority | ||
) |
Requests the user's screen reader to announce the given message.
This kind of notification is useful for messages that either have only a visual representation or that are not exposed visually at all, e.g. a notification about a successful operation.
Also, by using this API, you can ensure that the message does not interrupts the user's current screen reader output.
message | The string to announce. |
priority | The priority of the announcement. |
Glib::RefPtr< Accessible > Gtk::Accessible::get_accessible_parent | ( | ) |
Retrieves the accessible parent for an accessible object.
This function returns nullptr
for top level widgets.
Glib::RefPtr< const Accessible > Gtk::Accessible::get_accessible_parent | ( | ) | const |
Retrieves the accessible parent for an accessible object.
This function returns nullptr
for top level widgets.
Role Gtk::Accessible::get_accessible_role | ( | ) | const |
Retrieves the accessible role of an accessible object.
Glib::RefPtr< ATContext > Gtk::Accessible::get_at_context | ( | ) |
Retrieves the implementation for the given accessible object.
Glib::RefPtr< const ATContext > Gtk::Accessible::get_at_context | ( | ) | const |
Retrieves the implementation for the given accessible object.
bool Gtk::Accessible::get_bounds | ( | int & | x, |
int & | y, | ||
int & | width, | ||
int & | height | ||
) | const |
Queries the coordinates and dimensions of this accessible.
This functionality can be overridden by Gtk::Accessible
implementations, e.g. to get the bounds from an ignored child widget.
x | The x coordinate of the top left corner of the accessible. |
y | The y coordinate of the top left corner of the widget. |
width | The width of the accessible object. |
height | The height of the accessible object. |
Glib::RefPtr< Accessible > Gtk::Accessible::get_first_accessible_child | ( | ) |
Retrieves the first accessible child of an accessible object.
since: 4.10
Glib::RefPtr< const Accessible > Gtk::Accessible::get_first_accessible_child | ( | ) | const |
Retrieves the first accessible child of an accessible object.
since: 4.10
Glib::RefPtr< Accessible > Gtk::Accessible::get_next_accessible_sibling | ( | ) |
Retrieves the next accessible sibling of an accessible object.
since: 4.10
Glib::RefPtr< const Accessible > Gtk::Accessible::get_next_accessible_sibling | ( | ) | const |
Retrieves the next accessible sibling of an accessible object.
since: 4.10
bool Gtk::Accessible::get_platform_state | ( | PlatformState | state | ) | const |
Queries a platform state, such as focus.
This functionality can be overridden by Gtk::Accessible
implementations, e.g. to get platform state from an ignored child widget, as is the case for Gtk::Text
wrappers.
state | Platform state to query. |
|
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.
|
noexcept |
Glib::PropertyProxy< Role > Gtk::Accessible::property_accessible_role | ( | ) |
The accessible role of the given Gtk::Accessible
implementation.
The accessible role cannot be changed once set.
Default value: Gtk::Accessible::Role::NONE
Glib::PropertyProxy_ReadOnly< Role > Gtk::Accessible::property_accessible_role | ( | ) | const |
The accessible role of the given Gtk::Accessible
implementation.
The accessible role cannot be changed once set.
Default value: Gtk::Accessible::Role::NONE
Resets the accessible property to its default value.
property | The accessible property. |
Resets the accessible relation to its default value.
relation | The accessible relation. |
Resets the accessible state to its default value.
state | The accessible state. |
void Gtk::Accessible::set_accessible_parent | ( | const Glib::RefPtr< Accessible > & | parent, |
const Glib::RefPtr< Accessible > & | next_sibling | ||
) |
Sets the parent and sibling of an accessible object.
This function is meant to be used by accessible implementations that are not part of the widget hierarchy, and but act as a logical bridge between widgets. For instance, if a widget creates an object that holds metadata for each child, and you want that object to implement the Gtk::Accessible
interface, you will use this function to ensure that the parent of each child widget is the metadata object, and the parent of each metadata object is the container widget.
parent | The parent accessible object. |
next_sibling | The sibling accessible object. |
void Gtk::Accessible::update_next_accessible_sibling | ( | const Glib::RefPtr< Accessible > & | new_sibling | ) |
Updates the next accessible sibling.
That might be useful when a new child of a custom accessible is created, and it needs to be linked to a previous child.
new_sibling | The new next accessible sibling to set. |
void Gtk::Accessible::update_platform_state | ( | PlatformState | state | ) |
Informs ATs that the platform state has changed.
This function should be used by Gtk::Accessible
implementations that have a platform state but are not widgets. Widgets handle platform states automatically.
state | The platform state to update. |
void Gtk::Accessible::update_property | ( | Property | property, |
const Glib::ValueBase & | value | ||
) |
Updates an accessible property.
This function should be called by Gtk::Widget types whenever an accessible property change must be communicated to assistive technologies.
property | A Gtk::Accessible::Property. |
value | A Glib::ValueBase. |
void Gtk::Accessible::update_relation | ( | Relation | relation, |
const Glib::ValueBase & | value | ||
) |
Updates an accessible relation.
This function should be called by Gtk::Widget types whenever an accessible relation change must be communicated to assistive technologies.
relation | A Gtk::Accessible::Relation. |
value | A Glib::ValueBase. |
void Gtk::Accessible::update_state | ( | State | state, |
const Glib::ValueBase & | value | ||
) |
Updates an accessible state.
This function should be called by Gtk::Widget types whenever an accessible state change must be communicated to assistive technologies.
state | A Gtk::Accessible::State. |
value | A Glib::ValueBase. |
|
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. |