# synfigapp::InputDevice Class Reference

This class provides a device independent representation the state of an input device. More...

`#include <synfigapp/inputdevice.h>`

List of all members.

## Public Types

enum | Type { TYPE_MOUSE, TYPE_PEN, TYPE_ERASER, TYPE_CURSOR }
enum | Mode { MODE_DISABLED, MODE_SCREEN, MODE_WINDOW }
enum | AxisUse { AXIS_IGNORE, AXIS_X, AXIS_Y, AXIS_PRESSURE, AXIS_XTILT, AXIS_YTILT, AXIS_WHEEL, AXIS_LAST }
typedef etl::handle< InputDevice > | Handle

## Public Member Functions

| InputDevice (const synfig::String id_, Type type_=TYPE_MOUSE)
| ~InputDevice ()
const synfig::String & | get_id () const
const synfig::String & | get_state () const
const synfig::Color & | get_outline_color () const
const synfig::Color & | get_fill_color () const
const synfig::Distance & | get_bline_width () const
const synfig::Real & | get_opacity () const
const synfig::Color::BlendMethod & | get_blend_method () const
Type | get_type () const
Mode | get_mode () const
const std::vector< AxisUse > & | get_axes () const
const std::vector< DeviceKey > & | get_keys () const
void | set_state (const synfig::String &x)
void | set_outline_color (const synfig::Color &x)
void | set_fill_color (const synfig::Color &x)
void | set_bline_width (const synfig::Distance &x)
void | set_blend_method (const synfig::Color::BlendMethod &x)
void | set_opacity (const synfig::Real &x)
void | set_type (Type x)
void | set_mode (Mode x)
void | set_axes (const std::vector< AxisUse > &x)
void | set_keys (const std::vector< DeviceKey > &x)
Settings & | settings ()
const Settings & | settings () const

## Classes

struct | DeviceKey

## Detailed Description

This class provides a device independent representation the state of an input device.

See also:
  studio::DeviceTracker

  synfigapp::Settings

The represenation includes both the GDK state (e.g., mode) and synfigstudio state (e.g., outline color). An object of this class can be saved and restored using its Settings object, provided by the settings method.

## Member Typedef Documentation

typedef etl::handle<InputDevice> synfigapp::InputDevice::Handle

## Member Enumeration Documentation

enum synfigapp::InputDevice::Type

Enumerator:

  TYPE_MOUSE |
  TYPE_PEN |
  TYPE_ERASER |
  TYPE_CURSOR |

enum synfigapp::InputDevice::Mode

Enumerator:

  MODE_DISABLED |
  MODE_SCREEN |
  MODE_WINDOW |

enum synfigapp::InputDevice::AxisUse

Enumerator:

  AXIS_IGNORE |
  AXIS_X |
  AXIS_Y |
  AXIS_PRESSURE |
  AXIS_XTILT |
  AXIS_YTILT |
  AXIS_WHEEL |
  AXIS_LAST |

## Constructor & Destructor Documentation

InputDevice::InputDevice | ( | const synfig::String | id_,
|  | Type | type_ = `TYPE_MOUSE` |
| ) |  |  |

References synfigapp::Settings::add_domain(), and synfigapp::Main::settings().

InputDevice::~InputDevice | ( |  | ) |

References synfigapp::Settings::remove_domain(), and synfigapp::Main::settings().

## Member Function Documentation

const synfig::String& synfigapp::InputDevice::get_id | ( |  | ) | const`[inline]`

const synfig::String& synfigapp::InputDevice::get_state | ( |  | ) | const`[inline]`

const synfig::Color& synfigapp::InputDevice::get_outline_color | ( |  | ) | const`[inline]`

const synfig::Color& synfigapp::InputDevice::get_fill_color | ( |  | ) | const`[inline]`

const synfig::Distance& synfigapp::InputDevice::get_bline_width | ( |  | ) | const`[inline]`

const synfig::Real& synfigapp::InputDevice::get_opacity | ( |  | ) | const`[inline]`

const synfig::Color::BlendMethod& synfigapp::InputDevice::get_blend_method | ( |  | ) | const`[inline]`

Type synfigapp::InputDevice::get_type | ( |  | ) | const`[inline]`

Mode synfigapp::InputDevice::get_mode | ( |  | ) | const`[inline]`

const std::vector<AxisUse>& synfigapp::InputDevice::get_axes | ( |  | ) | const`[inline]`

const std::vector<DeviceKey>& synfigapp::InputDevice::get_keys | ( |  | ) | const`[inline]`

void synfigapp::InputDevice::set_state | ( | const synfig::String & | x | ) | `[inline]`

void synfigapp::InputDevice::set_outline_color | ( | const synfig::Color & | x | ) | `[inline]`

void synfigapp::InputDevice::set_fill_color | ( | const synfig::Color & | x | ) | `[inline]`

void synfigapp::InputDevice::set_bline_width | ( | const synfig::Distance & | x | ) | `[inline]`

void synfigapp::InputDevice::set_blend_method | ( | const synfig::Color::BlendMethod & | x | ) | `[inline]`

void synfigapp::InputDevice::set_opacity | ( | const synfig::Real & | x | ) | `[inline]`

void synfigapp::InputDevice::set_type | ( | Type | x | ) | `[inline]`

void synfigapp::InputDevice::set_mode | ( | Mode | x | ) | `[inline]`

void synfigapp::InputDevice::set_axes | ( | const std::vector< AxisUse > & | x | ) | `[inline]`

void synfigapp::InputDevice::set_keys | ( | const std::vector< DeviceKey > & | x | ) | `[inline]`

Settings & InputDevice::settings | ( |  | ) |

const Settings & InputDevice::settings | ( |  | ) | const

The documentation for this class was generated from the following files:

- inputdevice.h
- inputdevice.cpp