gtkmm 4.7.1

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:
[legend]

## Public Types
enum class | Feature { BUTTON , RING , 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. 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.

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 | ( |  | ) |
| override noexcept

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

  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.

## ◆ 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_idx | Group 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

  feature | A 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

  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.