gtkmm: Gdk::DevicePad Class Reference
Pad device interface. More...
#include <gdkmm/devicepad.h>
Public Types | |
enum | Feature { Feature::BUTTON, Feature::RING, Feature::STRIP } |
A pad feature. More... | |
Public Types inherited from sigc::trackable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Public Types inherited from sigc::notifiable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Public Member Functions | |
DevicePad (DevicePad&& src) noexcept | |
DevicePad& | operator= (DevicePad&& src) noexcept |
~DevicePad () noexcept override | |
GdkDevicePad* | gobj () |
Provides access to the underlying C GObject. More... | |
const GdkDevicePad* | gobj () const |
Provides access to the underlying C GObject. More... | |
int | get_n_groups () const |
Returns the number of groups this pad device has. More... | |
int | get_group_n_modes (int group_idx) const |
Returns the number of modes that group may have. More... | |
int | get_n_features (Feature feature) const |
Returns the number of features a tablet pad has. More... | |
int | get_feature_group (Feature feature, int feature_idx) const |
Returns the group the given feature and idx belong to, or -1 if feature/index do not exist in pad. More... | |
Public Member Functions inherited from Glib::Interface | |
Interface () | |
Interface (Interface &&src) noexcept | |
Interface & | operator= (Interface &&src) noexcept |
Interface (const Glib::Interface_Class &interface_class) | |
Interface (GObject *castitem) | |
~Interface () noexcept override | |
Interface (const Interface &)=delete | |
Interface & | operator= (const Interface &)=delete |
GObject * | gobj () |
const GObject * | gobj () const |
Public Member Functions inherited from Glib::ObjectBase | |
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 |
Public Member Functions inherited from sigc::trackable | |
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 void | add_interface (GType gtype_implementer) |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
DevicePad () | |
You should derive from this class to use it. More... | |
Protected Member Functions inherited from Glib::ObjectBase | |
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 Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gdk::DevicePad > | wrap (GdkDevicePad* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Detailed Description
Pad device interface.
Gdk::DevicePad is an interface implemented by devices of type Gdk::InputSource::TABLET_PAD. It allows querying the features provided by the pad device.
Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. get_n_groups() can be used to obtain the number of groups, get_n_features() and get_feature_group() can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped.
Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through get_group_n_modes(), and the current mode for a given group will be notified through the Gdk::EventPadGroupMode event.
Constructor & Destructor Documentation
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
Member Function Documentation
|
static |
int Gdk::DevicePad::get_feature_group | ( | Feature | feature, |
int | feature_idx | ||
) | const |
Returns the group the given feature and idx belong to, or -1 if feature/index do not exist in pad.
- Parameters
-
feature The feature type to get the group from. feature_idx The index of the feature to get the group from.
- Returns
- The group number of the queried pad feature.
int Gdk::DevicePad::get_group_n_modes | ( | int | group_idx | ) | const |
Returns the number of modes that group may have.
- Parameters
-
group_idx Group to get the number of available modes from.
- Returns
- The number of modes available in group.
int Gdk::DevicePad::get_n_features | ( | Feature | feature | ) | const |
Returns the number of features a tablet pad has.
- Parameters
-
feature A pad feature.
- Returns
- The amount of elements of type feature that this pad has.
int Gdk::DevicePad::get_n_groups | ( | ) | const |
Returns the number of groups this pad device has.
Pads have at least one group. A pad group is a subcollection of buttons/strip/rings that is affected collectively by a same current mode.
- Returns
- The number of button/ring/strip groups in the pad.
|
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.
Friends And Related Function Documentation
|
related |
A Glib::wrap() method for this object.
- Parameters
-
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.
- Returns
- A C++ instance that wraps this C instance.