synfig-studio
1.0.3
|
#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< 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 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::ValueDesc & | get_value_desc () const |
void | set_alternative_value_desc (const synfigapp::ValueDesc &x) |
const synfigapp::ValueDesc & | get_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 Handle & | get_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 Handle & | get_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 Handle & | get_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 Handle & | get_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 Handle & | get_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 Handle & | get_linear_duck () const |
void | set_connect_duck (const Handle &x) |
draw line from specified duck to this duck | |
const Handle & | get_connect_duck () const |
void | set_box_duck (const Handle &x) |
draw rectangle by two points - from this duck and from specified duck | |
const Handle & | get_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 |
typedef etl::handle<Duck> studio::Duck::Handle |
typedef etl::loose_handle<Duck> studio::Duck::LooseHandle |
enum studio::Duck::Type |
Duck::Duck | ( | ) |
|
explicit |
Duck::Duck | ( | const synfig::Point & | point, |
const synfig::Point & | origin | ||
) |
Duck::~Duck | ( | ) |
|
inline |
|
inline |
|
inline |
Referenced by set_duck_value_desc().
|
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().
|
inline |
Retrieves the name of the duck.
Referenced by get_data_guid().
|
inline |
|
inline |
Referenced by get_data_guid(), studio::Duckmatic::on_duck_changed(), and set_sub_trans_point().
|
inline |
Referenced by set_duck_value_desc().
|
inline |
Referenced by studio::Duckmatic::on_duck_changed(), and set_sub_trans_point().
|
inline |
|
inline |
Referenced by studio::Duckmatic::on_duck_changed().
|
inline |
References synfigapp::ValueDesc::is_valid().
|
inline |
Changes the editable flag.
|
inline |
Retrieves the status of the editable flag.
|
inline |
Changes the editable_alternative flag.
|
inline |
Retrieves the status of the editable_alternative flag.
Referenced by studio::Duckmatic::on_duck_changed().
|
inline |
|
inline |
|
inline |
If set, the duck will send signal_edited while moving. If not set, the duck will send signal_edited when button released.
|
inline |
|
inline |
References TYPE_TANGENT.
|
inline |
|
inline |
Sets whether to show the duck as if it is being hovered over.
|
inline |
Retrieves whether to show the duck as if it is being hovered over.
|
inline |
Sets whether to ignore the duck when checking for user interaction.
|
inline |
Retrieves whether to ignore the duck when checking for user interaction.
|
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
.
|
inline |
Retrieves the exponential value.
Referenced by studio::Duckmatic::on_duck_changed().
|
inline |
draw projection lines onto axes
|
inline |
|
inline |
Referenced by get_point(), and set_point().
|
inline |
|
inline |
Referenced by set_duck_value_desc().
|
inline |
|
inline |
Sets the scalar multiplier for the duck with respect to the origin.
|
inline |
Retrieves the scalar value.
Referenced by get_sub_trans_point(), get_sub_trans_point_without_offset(), studio::Duckmatic::on_duck_changed(), and set_sub_trans_point().
|
inline |
Sets the origin point.
|
inline |
Sets the origin point as another duck.
|
inline |
Retrieves the origin location.
|
inline |
Retrieves the origin duck.
|
inline |
Referenced by set_linear().
|
inline |
|
inline |
References get_sub_trans_point().
Referenced by get_axis_x(), and get_linear_angle().
|
inline |
Referenced by get_linear_duck().
|
inline |
|
inline |
|
inline |
References get_sub_trans_point().
Referenced by get_axis_x().
|
inline |
|
inline |
References get_axis_x_angle(), and get_axis_x_mag().
Referenced by get_sub_trans_point(), get_sub_trans_point_without_offset(), and set_sub_trans_point().
|
inline |
|
inline |
|
inline |
References get_sub_trans_point().
Referenced by get_axis_y().
|
inline |
|
inline |
Referenced by set_linear().
|
inline |
|
inline |
References get_sub_trans_point().
Referenced by get_axis_y(), and is_linear().
|
inline |
Referenced by is_linear().
|
inline |
References get_axis_y_angle(), and get_axis_y_mag().
Referenced by get_sub_trans_point(), get_sub_trans_point_without_offset(), and set_sub_trans_point().
|
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().
|
inline |
References is_linear(), and set_axis_y_mag().
|
inline |
References set_axis_x_angle(), and set_linear().
Referenced by set_linear().
|
inline |
References set_axis_x_angle(), and set_linear().
Referenced by set_linear().
|
inline |
References get_axis_x_angle().
|
inline |
References get_axis_x_angle_duck().
|
inline |
draw line from specified duck to this duck
|
inline |
|
inline |
draw rectangle by two points - from this duck and from specified duck
|
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 |
Returns the location of the duck.
References is_aspect_locked().
Referenced by get_sub_trans_point(), get_sub_trans_point_without_offset(), studio::Duckmatic::on_duck_changed(), and set_sub_trans_point().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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().
|
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 |
References get_axis_x(), get_axis_y(), get_scalar(), and get_sub_trans_origin().
synfig::Point Duck::get_sub_trans_point | ( | ) | const |
References get_point().
Referenced by get_axis_x_angle(), get_axis_x_mag(), get_axis_y_angle(), get_axis_y_mag(), get_sub_trans_origin(), and get_trans_point().
synfig::Point Duck::get_sub_trans_point_without_offset | ( | const synfig::Point & | x | ) | const |
References get_axis_x(), get_axis_y(), and get_scalar().
synfig::Point Duck::get_sub_trans_point_without_offset | ( | ) | const |
References get_point().
void Duck::set_sub_trans_point | ( | const synfig::Point & | x | ) |
References get_axis_x(), get_axis_y(), get_point(), get_scalar(), get_sub_trans_origin(), and set_point().
Referenced by set_sub_trans_point(), and set_trans_point().
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 |
|
inline |
References get_sub_trans_point().
Referenced by get_sub_trans_point().
synfig::Point Duck::get_sub_trans_origin | ( | ) | const |
References get_sub_trans_point().
Referenced by get_sub_trans_point(), get_trans_origin(), and set_sub_trans_point().
synfig::Point Duck::get_trans_origin | ( | ) | const |
Retrieves the origin location.
References get_sub_trans_origin().
bool Duck::operator== | ( | const Duck & | rhs | ) | const |
|
friend |