# studio::Duck Class Reference

`#include <duck.h>`

List of all members.

## Public Types

enum | Type { TYPE_NONE = (0), TYPE_POSITION = (1<<0), TYPE_TANGENT = (1<<1), TYPE_RADIUS = (1<<2), TYPE_WIDTH = (1<<3), TYPE_ANGLE = (1<<4), TYPE_VERTEX = (1<<5), TYPE_ALL = (~0), TYPE_DEFAULT = 0xdefadefa }
typedef etl::handle< Duck > | Handle
typedef etl::loose_handle< Duck > | LooseHandle

## Public Member Functions

| Duck ()
| Duck (const synfig::Point &point)
| Duck (const synfig::Point &point, const synfig::Point &origin)
| ~Duck ()
sigc::signal< bool, const synfig::Point & > & | signal_edited ()
sigc::signal< bool, const synfig::Angle & > & | signal_edited_angle ()
sigc::signal< void > & | signal_user_click (int i=0)
void | set_guid (const synfig::GUID &x)
const synfig::GUID & | get_guid () const
synfig::GUID | get_data_guid () const
void | set_editable (bool x)
| Changes the editable flag. If set, the duck will not be able to be moved.
bool | get_editable () const
| Retrieves the status of the editable flag.
void | set_tangent (bool x)
bool | get_tangent () const
void | set_hover (bool h)
| Sets whether to show the duck as if it is being hovered over.
bool | get_hover () const
| Retrieves whether to show the duck as if it is being hovered over.
void | set_ignore (bool i)
| Sets whether to ignore the duck when checking for user interaction.
bool | get_ignore () const
| Retrieves whether to ignore the duck when checking for user interaction.
void | set_connect_duck (const etl::handle< Duck > &x)
void | set_box_duck (const etl::handle< Duck > &x)
const etl::handle< Duck > & | get_connect_duck () const
const etl::handle< Duck > & | get_box_duck () const
void | set_value_desc (synfigapp::ValueDesc x)
synfigapp::ValueDesc & | get_value_desc ()
void | set_transform_stack (const synfig::TransformStack &x)
const synfig::TransformStack & | get_transform_stack () const
void | set_type (Type x)
Type | get_type () const
void | set_scalar (synfig::Vector::value_type n)
| Sets the scalar multiplier for the duck with respect to the origin.
synfig::Vector::value_type | get_scalar () const
| Retrieves the scalar value.
void | set_shared_point (const etl::smart_ptr< synfig::Point > &x)
void | set_point (const synfig::Point &x)
| Sets the location of the duck with respect to the origin.
synfig::Point | get_point () const
| Returns the location of the duck.
synfig::Angle | get_rotations () const
synfig::Point | get_trans_point () const
void | set_trans_point (const synfig::Point &x)
synfig::Point | get_sub_trans_point () const
void | set_sub_trans_point (const synfig::Point &x)
synfig::Point | get_sub_trans_origin () const
void | set_origin (const synfig::Point &x)
| Sets the origin point.
void | set_origin (const etl::handle< Duck > &x)
| Sets the origin point as another duck.
synfig::Point | get_origin () const
| Retrieves the origin location.
const etl::handle< Duck > & | get_origin_duck () const
| Retrieves the origin duck.
synfig::Point | get_trans_origin () const
| Retrieves the origin location.
void | set_radius (bool r)
bool | is_radius () const
void | set_name (const synfig::String &x)
| Sets the name of the duck.
synfig::String | get_name () const
| Retrieves the name of the duck.
bool | operator== (const Duck &rhs) const

## Friends

class | Duckmatic

## Detailed Description

Todo:
  This needs to be documented further.

## Member Typedef Documentation

typedef etl::handle<Duck> studio::Duck::Handle

typedef etl::loose_handle<Duck> studio::Duck::LooseHandle

## Member Enumeration Documentation

enum studio::Duck::Type

Enumerator:

  TYPE_NONE |
  TYPE_POSITION |
  TYPE_TANGENT |
  TYPE_RADIUS |
  TYPE_WIDTH |
  TYPE_ANGLE |
  TYPE_VERTEX |
  TYPE_ALL |
  TYPE_DEFAULT |

## Constructor & Destructor Documentation

Duck::Duck | ( |  | ) |

Duck::Duck | ( | const synfig::Point & | point | ) |

Duck::Duck | ( | const synfig::Point & | point,
|  | const synfig::Point & | origin |
| ) |  |  |

Duck::~Duck | ( |  | ) |

## Member Function Documentation

sigc::signal<bool,const synfig::Point &>& studio::Duck::signal_edited | ( |  | ) | `[inline]`

sigc::signal<bool,const synfig::Angle &>& studio::Duck::signal_edited_angle | ( |  | ) | `[inline]`

sigc::signal<void>& studio::Duck::signal_user_click | ( | int | i = `0` | ) | `[inline]`

void studio::Duck::set_guid | ( | const synfig::GUID & | x | ) | `[inline]`

const synfig::GUID& studio::Duck::get_guid | ( |  | ) | const`[inline]`

synfig::GUID Duck::get_data_guid | ( |  | ) | const

References get_name(), synfigapp::ValueDesc::get_value_node(), and synfigapp::ValueDesc::is_value_node().

void studio::Duck::set_editable | ( | bool | x | ) | `[inline]`

Changes the editable flag. If set, the duck will not be able to be moved.

bool studio::Duck::get_editable | ( |  | ) | const`[inline]`

Retrieves the status of the editable flag.

void studio::Duck::set_tangent | ( | bool | x | ) | `[inline]`

Todo:
  This needs to be documented further.

References TYPE_TANGENT.

bool studio::Duck::get_tangent | ( |  | ) | const`[inline]`

Todo:
  This needs to be documented further.

void studio::Duck::set_hover | ( | bool | h | ) | `[inline]`

Sets whether to show the duck as if it is being hovered over.

bool studio::Duck::get_hover | ( |  | ) | const`[inline]`

Retrieves whether to show the duck as if it is being hovered over.

void studio::Duck::set_ignore | ( | bool | i | ) | `[inline]`

Sets whether to ignore the duck when checking for user interaction.

bool studio::Duck::get_ignore | ( |  | ) | const`[inline]`

Retrieves whether to ignore the duck when checking for user interaction.

void studio::Duck::set_connect_duck | ( | const etl::handle< Duck > & | x | ) | `[inline]`

void studio::Duck::set_box_duck | ( | const etl::handle< Duck > & | x | ) | `[inline]`

const etl::handle<Duck>& studio::Duck::get_connect_duck | ( |  | ) | const`[inline]`

const etl::handle<Duck>& studio::Duck::get_box_duck | ( |  | ) | const`[inline]`

void studio::Duck::set_value_desc | ( | synfigapp::ValueDesc | x | ) | `[inline]`

synfigapp::ValueDesc& studio::Duck::get_value_desc | ( |  | ) | `[inline]`

void studio::Duck::set_transform_stack | ( | const synfig::TransformStack & | x | ) | `[inline]`

Referenced by studio::Duckmatic::add_to_ducks().

const synfig::TransformStack& studio::Duck::get_transform_stack | ( |  | ) | const`[inline]`

void studio::Duck::set_type | ( | Type | x | ) | `[inline]`

Todo:
  This needs to be documented further.

Type studio::Duck::get_type | ( |  | ) | const`[inline]`

Todo:
  This needs to be documented further.

Referenced by set_sub_trans_point().

void studio::Duck::set_scalar | ( | synfig::Vector::value_type | n | ) | `[inline]`

Sets the scalar multiplier for the duck with respect to the origin.

synfig::Vector::value_type studio::Duck::get_scalar | ( |  | ) | const`[inline]`

Retrieves the scalar value.

Referenced by get_sub_trans_point(), and set_sub_trans_point().

void studio::Duck::set_shared_point | ( | const etl::smart_ptr< synfig::Point > & | x | ) | `[inline]`

void studio::Duck::set_point | ( | const synfig::Point & | x | ) | `[inline]`

Sets the location of the duck with respect to the origin.

Referenced by set_sub_trans_point().

synfig::Point studio::Duck::get_point | ( |  | ) | const`[inline]`

Returns the location of the duck.

Referenced by get_sub_trans_point(), and set_sub_trans_point().

synfig::Angle studio::Duck::get_rotations | ( |  | ) | const`[inline]`

synfig::Point Duck::get_trans_point | ( |  | ) | const

References get_sub_trans_point().

void Duck::set_trans_point | ( | const synfig::Point & | x | ) |

References set_sub_trans_point().

synfig::Point Duck::get_sub_trans_point | ( |  | ) | const

References get_point(), get_scalar(), and get_sub_trans_origin().

Referenced by get_trans_point().

void Duck::set_sub_trans_point | ( | const synfig::Point & | x | ) |

References get_point(), get_scalar(), get_sub_trans_origin(), get_type(), set_point(), TYPE_ANGLE, and TYPE_TANGENT.

Referenced by set_trans_point().

synfig::Point Duck::get_sub_trans_origin | ( |  | ) | const

Referenced by get_sub_trans_point(), get_trans_origin(), and set_sub_trans_point().

void Duck::set_origin | ( | const synfig::Point & | x | ) |

Sets the origin point.

void Duck::set_origin | ( | const etl::handle< Duck > & | x | ) |

Sets the origin point as another duck.

synfig::Point Duck::get_origin | ( |  | ) | const

Retrieves the origin location.

const etl::handle< Duck > & Duck::get_origin_duck | ( |  | ) | const

Retrieves the origin duck.

synfig::Point Duck::get_trans_origin | ( |  | ) | const

Retrieves the origin location.

References get_sub_trans_origin().

void studio::Duck::set_radius | ( | bool | r | ) | `[inline]`

bool studio::Duck::is_radius | ( |  | ) | const`[inline]`

void Duck::set_name | ( | const synfig::String & | x | ) |

Sets the name of the duck.

synfig::String studio::Duck::get_name | ( |  | ) | const`[inline]`

Retrieves the name of the duck.

Referenced by get_data_guid().

bool Duck::operator== | ( | const Duck & | rhs | ) | const

References name, scalar, transform_stack_, and type_.

## Friends And Related Function Documentation

friend class Duckmatic `[friend]`

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

- duck.h
- duck.cpp