gtkmm 4.14.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gdk::DevicePad Class Reference

Pad device interface. More...

#include <gdkmm/devicepad.h>

Inheritance diagram for Gdk::DevicePad:
Inheritance graph
[legend]

Public Types

enum class  Feature {
  Feature::BUTTON ,
  Feature::RING ,
  Feature::STRIP
}
 A pad feature. More...
 

Public Member Functions

 DevicePad (DevicePad && src) noexcept
 
DevicePadoperator= (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. More...
 

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...
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gdk::DevicePadwrap (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.

Since gtkmm 3.96:

Constructor & Destructor Documentation

◆ DevicePad() [1/2]

Gdk::DevicePad::DevicePad ( )
protected

You should derive from this class to use it.

◆ DevicePad() [2/2]

Gdk::DevicePad::DevicePad ( DevicePad &&  src)
noexcept

◆ ~DevicePad()

Gdk::DevicePad::~DevicePad ( )
overridenoexcept

Member Function Documentation

◆ add_interface()

static void Gdk::DevicePad::add_interface ( GType  gtype_implementer)
static

◆ get_feature_group()

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.

Parameters
featureThe feature type to get the group from.
feature_idxThe index of the feature to get the group from.
Returns
The group number of the queried pad feature.

◆ get_group_n_modes()

int Gdk::DevicePad::get_group_n_modes ( int  group_idx) const

Returns the number of modes that group may have.

Parameters
group_idxGroup to get the number of available modes from.
Returns
The number of modes available in group.

◆ get_n_features()

int Gdk::DevicePad::get_n_features ( Feature  feature) const

Returns the number of features a tablet pad has.

Parameters
featureA pad feature.
Returns
The amount of elements of type feature that this pad has.

◆ get_n_groups()

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.

◆ get_type()

static GType Gdk::DevicePad::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GdkDevicePad * Gdk::DevicePad::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GdkDevicePad * Gdk::DevicePad::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ operator=()

DevicePad & Gdk::DevicePad::operator= ( DevicePad &&  src)
noexcept

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gdk::DevicePad > wrap ( GdkDevicePad *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse 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.