synfig-core  1.0.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
synfig::ValueNode_WPList Class Reference

This class implements a list of Width Points It will provide methods to calculate the width at any intermediate position and the insertion and remove of width points. It shouldn't allow to remove all the width points to still allowing to the user to add new ones. More...

#include <valuenode_wplist.h>

Inheritance diagram for synfig::ValueNode_WPList:
synfig::ValueNode_DynamicList synfig::LinkableValueNode synfig::ValueNode synfig::Node

Public Types

typedef etl::handle
< ValueNode_WPList
Handle
typedef etl::handle< const
ValueNode_WPList
ConstHandle
typedef etl::handle< const
ValueNode_WPList
LooseHandle
- Public Types inherited from synfig::ValueNode_DynamicList
typedef etl::handle
< ValueNode_DynamicList
Handle
typedef etl::handle< const
ValueNode_DynamicList
ConstHandle
- Public Types inherited from synfig::LinkableValueNode
typedef etl::handle
< LinkableValueNode
Handle
typedef etl::loose_handle
< LinkableValueNode
LooseHandle
typedef etl::handle< const
LinkableValueNode
ConstHandle
typedef etl::rhandle
< LinkableValueNode
RHandle
typedef LinkableValueNode *(* Factory )(const ValueBase &, etl::loose_handle< Canvas > canvas)
 Type that represents a pointer to a ValueNode's constructor.
typedef bool(* CheckType )(Type &type)
 This represents a pointer to a Type check member fucntion.
typedef std::map< String,
BookEntry
Book
 Book of types of linkable value nodes indexed by type name.
typedef ParamVocab Vocab
 The vocabulary of the children.
- Public Types inherited from synfig::ValueNode
typedef etl::handle< ValueNodeHandle
typedef etl::loose_handle
< ValueNode
LooseHandle
typedef etl::handle< const
ValueNode
ConstHandle
typedef etl::rhandle< ValueNodeRHandle
- Public Types inherited from synfig::Node
typedef TimePointSet time_set

Public Member Functions

 ValueNode_WPList ()
virtual ValueBase operator() (Time t) const
 Returns the value of the ValueNode at time t.
virtual ~ValueNode_WPList ()
virtual String link_local_name (int i) const
 Returns the local name of the 'i' linked Value Node.
virtual String get_name () const
 Returns the name of the ValueNode type.
virtual String get_local_name () const
 Returns the localized name of the ValueNode type.
virtual ListEntry create_list_entry (int index, Time time=0, Real origin=0.5)
WidthPoint find_next_valid_entry_by_position (Real position, Time time=0) const
WidthPoint find_prev_valid_entry_by_position (Real position, Time time=0) const
Real interpolated_width (Real position, Time time) const
ValueNode::LooseHandle get_bline () const
 Gets the bline RHandle.
void set_bline (ValueNode::Handle b)
 Sets the bline RHandle.
- Public Member Functions inherited from synfig::ValueNode_DynamicList
void add (const ValueNode::Handle &value_node, int index=-1)
void add (const ListEntry &value_node, int index=-1)
void erase (const ValueNode::Handle &value_node)
void reindex ()
int find_next_valid_entry (int x, Time t) const
int find_prev_valid_entry (int x, Time t) const
virtual ValueNode::LooseHandle get_link_vfunc (int i) const
 Virtual member to get the linked Value Node Handle.
virtual int link_count () const
 Returns the number of linked Value Nodes.
virtual String link_name (int i) const
 Returns the name of the 'i' linked Value Node.
virtual ~ValueNode_DynamicList ()
virtual int get_link_index_from_name (const String &name) const
 Returns the child index Value Node based on the name.
bool get_loop () const
void set_loop (bool x)
void set_member_canvas (etl::loose_handle< Canvas >)
Typeget_contained_type () const
void insert_time (const Time &location, const Time &delta)
virtual ValueNode::Handle clone (etl::loose_handle< Canvas > canvas, const GUID &deriv_guid=GUID()) const
 Clones a Value Node.
virtual Vocab get_children_vocab_vfunc () const
 Pure Virtual member to get the children vocabulary.
- Public Member Functions inherited from synfig::LinkableValueNode
 LinkableValueNode (Type &type=type_nil)
 Member to store the children vocabulary.
bool set_link (int i, ValueNode::Handle x)
 Sets a new Value Node link by its index.
bool set_link (const String &name, ValueNode::Handle x)
 Sets a new Value Node link by its name.
ValueNode::LooseHandle get_link (int i) const
 Returns a Loose Handle to the Value Node based on the link's index.
ValueNode::LooseHandle get_link (const String &name) const
 Returns a Loose Handle to the Value Node based on the link's name.
String get_description (int index=-1, bool show_exported_name=true) const
 Return a full description of the linked ValueNode given by the index.
String get_description (bool show_exported_name=true) const
virtual Vocab get_children_vocab () const
 Gets the children vocabulary for linkable value nodes.
virtual void set_root_canvas (etl::loose_handle< Canvas > x)
 Member to store the children vocabulary.

Static Public Member Functions

static bool check_type (Type &type)
static ValueNode_WPListcreate (const ValueBase &x=type_list)
- Static Public Member Functions inherited from synfig::ValueNode_DynamicList
template<typename iterator >
static Handle create (iterator begin, iterator end)
static Handle create (Type &type=type_nil, etl::loose_handle< Canvas > canvas=0)
static ValueNode_DynamicListcreate_from (const ValueBase &x=type_gradient)
- Static Public Member Functions inherited from synfig::LinkableValueNode
static Bookbook ()
static Handle create (const String &name, const ValueBase &x, etl::loose_handle< Canvas > canvas)
static bool check_type (const String &name, Type &x)
 Member to store the children vocabulary.
- Static Public Member Functions inherited from synfig::ValueNode
static bool subsys_init ()
 Instantiates the book of ValaueNodes and register all the valid valuenodes on it.
static bool subsys_stop ()
 Deletes the book of ValueNodes.
static void breakpoint ()

Protected Member Functions

LinkableValueNodecreate_new () const
 Wrapper for new operator, used by clone()
- Protected Member Functions inherited from synfig::ValueNode_DynamicList
 ValueNode_DynamicList (Type &container_type=type_nil, etl::loose_handle< Canvas > canvas=0)
 ValueNode_DynamicList (Type &container_type, Type &type, etl::loose_handle< Canvas > canvas=0)
virtual bool set_link_vfunc (int i, ValueNode::Handle x)
virtual void get_times_vfunc (Node::time_set &set) const
 Returns the cached times values for all the children (linked Value Nodes)
- Protected Member Functions inherited from synfig::LinkableValueNode
void unlink_all ()
void set_type (Type &t)
 Sets the type of the ValueNode.
virtual void set_children_vocab (const Vocab &rvocab)
 Virtual memebr to set the children vocabulary to a given value.

Additional Inherited Members

- Public Attributes inherited from synfig::ValueNode_DynamicList
std::vector< ListEntrylist
- Protected Attributes inherited from synfig::ValueNode_DynamicList
Typecontainer_type
bool loop_

Detailed Description

This class implements a list of Width Points It will provide methods to calculate the width at any intermediate position and the insertion and remove of width points. It shouldn't allow to remove all the width points to still allowing to the user to add new ones.

Member Typedef Documentation

Constructor & Destructor Documentation

ValueNode_WPList::ValueNode_WPList ( )

Referenced by create(), and create_new().

ValueNode_WPList::~ValueNode_WPList ( )
virtual

Member Function Documentation

ValueBase ValueNode_WPList::operator() ( Time  ) const
virtual
String ValueNode_WPList::link_local_name ( int  i) const
virtual

Returns the local name of the 'i' linked Value Node.

Reimplemented from synfig::ValueNode_DynamicList.

References _, and synfig::ValueNode_DynamicList::list.

String ValueNode_WPList::get_name ( ) const
virtual

Returns the name of the ValueNode type.

Reimplemented from synfig::ValueNode_DynamicList.

String ValueNode_WPList::get_local_name ( ) const
virtual

Returns the localized name of the ValueNode type.

Reimplemented from synfig::ValueNode_DynamicList.

References _.

ValueNode_WPList::ListEntry ValueNode_WPList::create_list_entry ( int  index,
Time  time = 0,
Real  origin = 0.5 
)
virtual

Inserts a new entry between the previous found widthpoint and the one where the action was called with an average width and a middle position.

Parameters
indexthe index of the entry wher the action is done
timethe time when inserted in animation mode
originunused. Always is in the middle.
Returns
the new List Entry

Reimplemented from synfig::ValueNode_DynamicList.

References create(), find_prev_valid_entry_by_position(), synfig::ValueNode_DynamicList::get_loop(), synfig::WidthPoint::get_norm_position(), synfig::ValueNode::get_parent_canvas(), synfig::WidthPoint::get_width(), synfig::ValueNode_DynamicList::link_count(), synfig::ValueNode_DynamicList::list, synfig::WidthPoint::set_position(), synfig::WidthPoint::set_width(), and synfig::ValueNode_DynamicList::ListEntry::value_node.

synfig::WidthPoint ValueNode_WPList::find_next_valid_entry_by_position ( Real  position,
Time  time = 0 
) const

Finds a fully on width point at given time and after the given position

Parameters
positionthe position where to start to seek from
timethe time when things are evaluated
Returns
a width point reference with the proper values

References synfig::ValueNode_DynamicList::get_loop(), synfig::WidthPoint::get_norm_position(), and synfig::ValueNode_DynamicList::list.

Referenced by find_prev_valid_entry_by_position(), and interpolated_width().

synfig::WidthPoint ValueNode_WPList::find_prev_valid_entry_by_position ( Real  position,
Time  time = 0 
) const

Finds a fully on width point at given time and before the given position

Parameters
positionthe position where to start to seek from
timethe time when things are evaluated
Returns
a width point reference with the proper values

References find_next_valid_entry_by_position(), get_bline(), synfig::ValueNode_DynamicList::get_loop(), synfig::WidthPoint::get_norm_position(), synfig::WidthPoint::get_position(), synfig::ValueNode_DynamicList::list, and synfig::WidthPoint::set_position().

Referenced by create_list_entry(), and interpolated_width().

Real ValueNode_WPList::interpolated_width ( Real  position,
Time  time 
) const

Interpolated width at a a given time based on surrounding full 'on' widht points

Parameters
positionthe position where to evaluate the width
timethe time when evaluates
Returns
the interpolated width

References find_next_valid_entry_by_position(), find_prev_valid_entry_by_position(), synfig::ValueNode_DynamicList::get_loop(), synfig::WidthPoint::normalize(), and synfig::widthpoint_interpolate().

Referenced by operator()().

ValueNode::LooseHandle ValueNode_WPList::get_bline ( ) const

Gets the bline RHandle.

Referenced by find_prev_valid_entry_by_position().

void ValueNode_WPList::set_bline ( ValueNode::Handle  b)

Sets the bline RHandle.

LinkableValueNode * ValueNode_WPList::create_new ( ) const
protectedvirtual

Wrapper for new operator, used by clone()

Reimplemented from synfig::ValueNode_DynamicList.

References ValueNode_WPList().

bool ValueNode_WPList::check_type ( Type type)
static

Reimplemented from synfig::ValueNode_DynamicList.

References synfig::type_list.

ValueNode_WPList * ValueNode_WPList::create ( const ValueBase x = type_list)
static

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