synfig-studio  1.0.3
Public Types | Public Member Functions | Friends | List of all members
studio::Duck Class Reference

#include <duck.h>

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_BONE_RECURSIVE = (1 << 6),
  TYPE_WIDTHPOINT_POSITION = (1 << 7), TYPE_SCALE = (1 << 8), TYPE_SCALE_X = (1 << 9), TYPE_SCALE_Y = (1 << 10),
  TYPE_SKEW = (1 << 11), TYPE_ALL = (~0), TYPE_DEFAULT = 0xdefadefa
}
typedef etl::handle< DuckHandle
typedef etl::loose_handle< DuckLooseHandle

Public Member Functions

 Duck ()
 Duck (const synfig::Point &point)
 Duck (const synfig::Point &point, const synfig::Point &origin)
 ~Duck ()
sigc::signal< bool, const Duck & > & signal_edited ()
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_name (const synfig::String &x)
 Sets the name of the duck.
synfig::String get_name () const
 Retrieves the name of the duck.
void set_type (Type x)
Type get_type () const
void set_value_desc (const synfigapp::ValueDesc &x)
const synfigapp::ValueDescget_value_desc () const
void set_alternative_value_desc (const synfigapp::ValueDesc &x)
const synfigapp::ValueDescget_alternative_value_desc () const
bool get_editable (bool is_alternative_mode) const
void set_editable (bool x)
 Changes the editable flag.
bool get_editable () const
 Retrieves the status of the editable flag.
void set_alternative_editable (bool x)
 Changes the editable_alternative flag.
bool get_alternative_editable () const
 Retrieves the status of the editable_alternative flag.
bool is_radius () const
void set_radius (bool r)
void set_edit_immediatelly (bool x)
bool get_edit_immediatelly () const
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_exponential (bool n)
 Sets if the duck is using the exponential function.
bool get_exponential () const
 Retrieves the exponential value.
bool is_axes_tracks () const
 draw projection lines onto axes
void set_track_axes (bool r)
bool is_aspect_locked () const
void set_lock_aspect (bool r)
void set_transform_stack (const synfig::TransformStack &x)
const synfig::TransformStack & get_transform_stack () 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_origin (const synfig::Point &x)
 Sets the origin point.
void set_origin (const Handle &x)
 Sets the origin point as another duck.
synfig::Point get_origin () const
 Retrieves the origin location.
const Handleget_origin_duck () const
 Retrieves the origin duck.
void set_axis_x_angle (const synfig::Angle &a)
void set_axis_x_angle (const Handle &duck, const synfig::Angle angle=synfig::Angle::zero())
synfig::Angle get_axis_x_angle () const
const Handleget_axis_x_angle_duck () const
void set_axis_x_mag (const synfig::Real &m)
void set_axis_x_mag (const Handle &duck)
synfig::Real get_axis_x_mag () const
const Handleget_axis_x_mag_duck () const
synfig::Point get_axis_x () const
void set_axis_y_angle (const synfig::Angle &a)
void set_axis_y_angle (const Handle &duck, const synfig::Angle angle=synfig::Angle::zero())
synfig::Angle get_axis_y_angle () const
const Handleget_axis_y_angle_duck () const
void set_axis_y_mag (const synfig::Real &m)
void set_axis_y_mag (const Handle &duck)
synfig::Real get_axis_y_mag () const
const Handleget_axis_y_mag_duck () const
synfig::Point get_axis_y () const
bool is_linear () const
 linear ducks moves along specified axis only (angle locked)
void set_linear (bool r)
void set_linear (bool r, const synfig::Angle &a)
void set_linear (bool r, const Handle &duck)
synfig::Angle get_linear_angle () const
const Handleget_linear_duck () const
void set_connect_duck (const Handle &x)
 draw line from specified duck to this duck
const Handleget_connect_duck () const
void set_box_duck (const Handle &x)
 draw rectangle by two points - from this duck and from specified duck
const Handleget_box_duck () const
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.
void set_shared_point (const etl::smart_ptr< synfig::Point > &x)
const etl::smart_ptr
< synfig::Point > & 
get_shared_point () const
void set_shared_angle (const etl::smart_ptr< synfig::Angle > &x)
const etl::smart_ptr
< synfig::Angle > & 
get_shared_angle () const
void set_shared_mag (const etl::smart_ptr< synfig::Real > &x)
const etl::smart_ptr
< synfig::Real > & 
get_shared_mag () const
synfig::Angle get_rotations () const
void set_rotations (const synfig::Angle &x)
 Sets the rotations of the duck.
synfig::Point get_trans_point () const
void set_trans_point (const synfig::Point &x)
void set_trans_point (const synfig::Point &x, const synfig::Time &time)
synfig::Point get_sub_trans_point (const synfig::Point &x) const
synfig::Point get_sub_trans_point () const
synfig::Point get_sub_trans_point_without_offset (const synfig::Point &x) const
synfig::Point get_sub_trans_point_without_offset () const
void set_sub_trans_point (const synfig::Point &x)
void set_sub_trans_point (const synfig::Point &x, const synfig::Time &time)
synfig::Point get_sub_trans_point (const Handle &duck, const synfig::Point &def, bool translate=true) const
synfig::Point get_sub_trans_point (const Handle &duck, bool translate=true) const
synfig::Point get_sub_trans_origin () const
synfig::Point get_trans_origin () const
 Retrieves the origin location.
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

Enumerator:
TYPE_NONE 
TYPE_POSITION 
TYPE_TANGENT 
TYPE_RADIUS 
TYPE_WIDTH 
TYPE_ANGLE 
TYPE_VERTEX 
TYPE_BONE_RECURSIVE 
TYPE_WIDTHPOINT_POSITION 
TYPE_SCALE 
TYPE_SCALE_X 
TYPE_SCALE_Y 
TYPE_SKEW 
TYPE_ALL 
TYPE_DEFAULT 

Constructor & Destructor Documentation

Duck::Duck ( )
Duck::Duck ( const synfig::Point &  point)
explicit
Duck::Duck ( const synfig::Point &  point,
const synfig::Point &  origin 
)
Duck::~Duck ( )

Member Function Documentation

sigc::signal<bool,const Duck &>& studio::Duck::signal_edited ( )
inline
sigc::signal<void>& studio::Duck::signal_user_click ( int  i = 0)
inline
void studio::Duck::set_guid ( const synfig::GUID &  x)
inline

Referenced by set_duck_value_desc().

const synfig::GUID& studio::Duck::get_guid ( ) const
inline
synfig::GUID Duck::get_data_guid ( ) const
void Duck::set_name ( const synfig::String &  x)

Sets the name of the duck.

Referenced by set_duck_value_desc().

synfig::String studio::Duck::get_name ( ) const
inline

Retrieves the name of the duck.

Referenced by get_data_guid().

void studio::Duck::set_type ( Type  x)
inline
Type studio::Duck::get_type ( ) const
inline
void studio::Duck::set_value_desc ( const synfigapp::ValueDesc x)
inline

Referenced by set_duck_value_desc().

const synfigapp::ValueDesc& studio::Duck::get_value_desc ( ) const
inline
void studio::Duck::set_alternative_value_desc ( const synfigapp::ValueDesc x)
inline
const synfigapp::ValueDesc& studio::Duck::get_alternative_value_desc ( ) const
inline
bool studio::Duck::get_editable ( bool  is_alternative_mode) const
inline
void studio::Duck::set_editable ( bool  x)
inline

Changes the editable flag.

bool studio::Duck::get_editable ( ) const
inline

Retrieves the status of the editable flag.

void studio::Duck::set_alternative_editable ( bool  x)
inline

Changes the editable_alternative flag.

bool studio::Duck::get_alternative_editable ( ) const
inline

Retrieves the status of the editable_alternative flag.

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

bool studio::Duck::is_radius ( ) const
inline
void studio::Duck::set_radius ( bool  r)
inline
void studio::Duck::set_edit_immediatelly ( bool  x)
inline

If set, the duck will send signal_edited while moving. If not set, the duck will send signal_edited when button released.

bool studio::Duck::get_edit_immediatelly ( ) const
inline
void studio::Duck::set_tangent ( bool  x)
inline

References TYPE_TANGENT.

bool studio::Duck::get_tangent ( ) const
inline
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_exponential ( bool  n)
inline

Sets if the duck is using the exponential function.

Such representation allows to set the Real values in the range from -inf to inf .

bool studio::Duck::get_exponential ( ) const
inline

Retrieves the exponential value.

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

bool studio::Duck::is_axes_tracks ( ) const
inline

draw projection lines onto axes

void studio::Duck::set_track_axes ( bool  r)
inline
bool studio::Duck::is_aspect_locked ( ) const
inline

Referenced by get_point(), and set_point().

void studio::Duck::set_lock_aspect ( bool  r)
inline
void studio::Duck::set_transform_stack ( const synfig::TransformStack &  x)
inline

Referenced by set_duck_value_desc().

const synfig::TransformStack& studio::Duck::get_transform_stack ( ) const
inline
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
void studio::Duck::set_origin ( const synfig::Point &  x)
inline

Sets the origin point.

void studio::Duck::set_origin ( const Handle x)
inline

Sets the origin point as another duck.

synfig::Point studio::Duck::get_origin ( ) const
inline

Retrieves the origin location.

const Handle& studio::Duck::get_origin_duck ( ) const
inline

Retrieves the origin duck.

void studio::Duck::set_axis_x_angle ( const synfig::Angle &  a)
inline

Referenced by set_linear().

void studio::Duck::set_axis_x_angle ( const Handle duck,
const synfig::Angle  angle = synfig::Angle::zero() 
)
inline
synfig::Angle studio::Duck::get_axis_x_angle ( ) const
inline

References get_sub_trans_point().

Referenced by get_axis_x(), and get_linear_angle().

const Handle& studio::Duck::get_axis_x_angle_duck ( ) const
inline

Referenced by get_linear_duck().

void studio::Duck::set_axis_x_mag ( const synfig::Real &  m)
inline
void studio::Duck::set_axis_x_mag ( const Handle duck)
inline
synfig::Real studio::Duck::get_axis_x_mag ( ) const
inline

References get_sub_trans_point().

Referenced by get_axis_x().

const Handle& studio::Duck::get_axis_x_mag_duck ( ) const
inline
synfig::Point studio::Duck::get_axis_x ( ) const
inline
void studio::Duck::set_axis_y_angle ( const synfig::Angle &  a)
inline
void studio::Duck::set_axis_y_angle ( const Handle duck,
const synfig::Angle  angle = synfig::Angle::zero() 
)
inline
synfig::Angle studio::Duck::get_axis_y_angle ( ) const
inline

References get_sub_trans_point().

Referenced by get_axis_y().

const Handle& studio::Duck::get_axis_y_angle_duck ( ) const
inline
void studio::Duck::set_axis_y_mag ( const synfig::Real &  m)
inline

Referenced by set_linear().

void studio::Duck::set_axis_y_mag ( const Handle duck)
inline
synfig::Real studio::Duck::get_axis_y_mag ( ) const
inline

References get_sub_trans_point().

Referenced by get_axis_y(), and is_linear().

const Handle& studio::Duck::get_axis_y_mag_duck ( ) const
inline

Referenced by is_linear().

synfig::Point studio::Duck::get_axis_y ( ) const
inline
bool studio::Duck::is_linear ( ) const
inline

linear ducks moves along specified axis only (angle locked)

References get_axis_y_mag(), and get_axis_y_mag_duck().

Referenced by set_linear().

void studio::Duck::set_linear ( bool  r)
inline

References is_linear(), and set_axis_y_mag().

void studio::Duck::set_linear ( bool  r,
const synfig::Angle &  a 
)
inline

References set_axis_x_angle(), and set_linear().

Referenced by set_linear().

void studio::Duck::set_linear ( bool  r,
const Handle duck 
)
inline

References set_axis_x_angle(), and set_linear().

Referenced by set_linear().

synfig::Angle studio::Duck::get_linear_angle ( ) const
inline

References get_axis_x_angle().

const Handle& studio::Duck::get_linear_duck ( ) const
inline
void studio::Duck::set_connect_duck ( const Handle x)
inline

draw line from specified duck to this duck

const Handle& studio::Duck::get_connect_duck ( ) const
inline
void studio::Duck::set_box_duck ( const Handle x)
inline

draw rectangle by two points - from this duck and from specified duck

const Handle& studio::Duck::get_box_duck ( ) const
inline
void Duck::set_point ( const synfig::Point &  x)

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

References is_aspect_locked().

Referenced by set_sub_trans_point().

synfig::Point Duck::get_point ( ) const
void studio::Duck::set_shared_point ( const etl::smart_ptr< synfig::Point > &  x)
inline
const etl::smart_ptr<synfig::Point>& studio::Duck::get_shared_point ( ) const
inline
void studio::Duck::set_shared_angle ( const etl::smart_ptr< synfig::Angle > &  x)
inline
const etl::smart_ptr<synfig::Angle>& studio::Duck::get_shared_angle ( ) const
inline
void studio::Duck::set_shared_mag ( const etl::smart_ptr< synfig::Real > &  x)
inline
const etl::smart_ptr<synfig::Real>& studio::Duck::get_shared_mag ( ) const
inline
synfig::Angle studio::Duck::get_rotations ( ) const
inline

Returns the rotations of the duck For angle and tangent ducks, rotations are used instead of the location so that the duck can me rotated more than 180 degrees

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

void studio::Duck::set_rotations ( const synfig::Angle &  x)
inline

Sets the rotations of the duck.

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

void Duck::set_trans_point ( const synfig::Point &  x,
const synfig::Time &  time 
)

References set_sub_trans_point().

synfig::Point Duck::get_sub_trans_point ( const synfig::Point &  x) const
synfig::Point Duck::get_sub_trans_point ( ) const
synfig::Point Duck::get_sub_trans_point_without_offset ( const synfig::Point &  x) const
synfig::Point Duck::get_sub_trans_point_without_offset ( ) const

References get_point().

void Duck::set_sub_trans_point ( const synfig::Point &  x)
void Duck::set_sub_trans_point ( const synfig::Point &  x,
const synfig::Time &  time 
)
synfig::Point studio::Duck::get_sub_trans_point ( const Handle duck,
const synfig::Point &  def,
bool  translate = true 
) const
synfig::Point studio::Duck::get_sub_trans_point ( const Handle duck,
bool  translate = true 
) const
inline

References get_sub_trans_point().

Referenced by get_sub_trans_point().

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

Retrieves the origin location.

References get_sub_trans_origin().

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

Friends And Related Function Documentation

friend class Duckmatic
friend

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