gtkmm 4.16.0
|
Pad device interface. More...
#include <gdkmm/devicepad.h>
Public Types | |
enum class | Feature { BUTTON , RING , STRIP } |
Public Member Functions | |
DevicePad (DevicePad && src) noexcept | |
DevicePad & | operator= (DevicePad && src) noexcept |
~DevicePad () noexcept override | |
GdkDevicePad * | gobj () |
Provides access to the underlying C GObject. | |
const GdkDevicePad * | gobj () const |
Provides access to the underlying C GObject. | |
int | get_n_groups () const |
Returns the number of groups this pad device has. | |
int | get_group_n_modes (int group_idx) const |
Returns the number of modes that group may have. | |
int | get_n_features (Feature feature) const |
Returns the number of features a tablet pad has. | |
int | get_feature_group (Feature feature, int feature_idx) const |
Returns the group the given feature and idx belong to. | |
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 | |
DevicePad () | |
You should derive from this class to use it. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gdk::DevicePad > | wrap (GdkDevicePad * object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
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.
|
strong |
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
|
static |
int Gdk::DevicePad::get_feature_group | ( | Feature | feature, |
int | feature_idx | ||
) | const |
Returns the group the given feature and idx belong to.
f the feature or index do not exist in pad, -1 is returned.
feature | The feature type to get the group from. |
feature_idx | The index of the feature to get the group from. |
int Gdk::DevicePad::get_group_n_modes | ( | int | group_idx | ) | const |
Returns the number of modes that group may have.
group_idx | Group to get the number of available modes from. |
int Gdk::DevicePad::get_n_features | ( | Feature | feature | ) | const |
Returns the number of features a tablet pad has.
feature | A pad feature. |
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.
|
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.
|
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. |