cluttermm 1.3.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Clutter::Timeline Class Reference
Inheritance diagram for Clutter::Timeline:
Inheritance graph
[legend]
Collaboration diagram for Clutter::Timeline:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~Timeline ()
ClutterTimeline* gobj ()
 Provides access to the underlying C GObject.
const ClutterTimeline* gobj () const
 Provides access to the underlying C GObject.
ClutterTimeline* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< Timelineclone () const
 Create a new Clutter::Timeline instance which has property values matching that of supplied timeline.
void set_duration (guint msecs)
 Sets the duration of the timeline, in milliseconds.
guint get_duration () const
 Retrieves the duration of a Clutter::Timeline in milliseconds.
void start ()
 Starts the Clutter::Timeline playing.
void pause ()
 Pauses the Clutter::Timeline on current frame.
void stop ()
 Stops the Clutter::Timeline and moves to frame 0.
void rewind ()
 Rewinds Clutter::Timeline to the first frame if its direction is Clutter::TIMELINE_FORWARD and the last frame if it is Clutter::TIMELINE_BACKWARD.
void set_loop (bool loop=true)
 Sets whether timeline should loop.
bool get_loop () const
 Gets whether timeline is looping.
void skip (guint n_frames)
 Advance timeline by the requested time in milliseconds.
void advance (guint frame_num)
 Advance timeline to the requested point.
guint get_delta () const
 Retrieves the amount of time elapsed since the last ClutterTimeline::new-frame signal.
bool is_playing () const
 Queries state of a Clutter::Timeline.
void set_delay (guint msecs)
 Sets the delay, in milliseconds, before timeline should start.
guint get_delay () const
 Retrieves the delay set using set_delay().
guint get_elapsed_time () const
 Request the current time position of the timeline.
double get_progress () const
 The position of the timeline in a [0, 1] interval.
void set_direction (TimelineDirection direction)
 Sets the direction of timeline, either Clutter::TIMELINE_FORWARD or Clutter::TIMELINE_BACKWARD.
TimelineDirection get_direction () const
 Retrieves the direction of the timeline set with set_direction().
std::vector< Glib::ustring > list_markers (int frame_num) const
 Retrieves the list of markers at time msecs.
void add_marker_at_time (const Glib::ustring& marker_name, guint msecs)
 Adds a named marker that will be hit when the timeline has been running for msecs milliseconds.
bool has_marker (const Glib::ustring& marker_name)
 Checks whether timeline has a marker set with the given name.
void remove_marker (const Glib::ustring& marker_name)
 Removes marker_name, if found, from timeline.
void advance_to_marker (const Glib::ustring& marker_name)
 Advances timeline to the time of the given marker_name.
Glib::PropertyProxy< guint > property_delay ()
 Delay before start.
Glib::PropertyProxy_ReadOnly
< guint > 
property_delay () const
 Delay before start.
Glib::PropertyProxy
< TimelineDirection
property_direction ()
 Direction of the timeline.
Glib::PropertyProxy_ReadOnly
< TimelineDirection
property_direction () const
 Direction of the timeline.
Glib::PropertyProxy< guint > property_duration ()
 Duration of the timeline in milliseconds.
Glib::PropertyProxy_ReadOnly
< guint > 
property_duration () const
 Duration of the timeline in milliseconds.
Glib::PropertyProxy< bool > property_loop ()
 Should the timeline automatically restart.
Glib::PropertyProxy_ReadOnly
< bool > 
property_loop () const
 Should the timeline automatically restart.
Glib::SignalProxy0< void > signal_completed ()
Glib::SignalProxy1< void, int > signal_new_frame ()
Glib::SignalProxy0< void > signal_paused ()
Glib::SignalProxy0< void > signal_started ()
Glib::SignalProxy2< void,
const Glib::ustring&, int > 
signal_marker_reached ()

Static Public Member Functions

static Glib::RefPtr< Timelinecreate (guint msecs)

Protected Member Functions

 Timeline (guint msecs)
 Creates a new Clutter::Timeline with a duration of msecs.
virtual void on_completed ()
virtual void on_new_frame (int fram_num)
virtual void on_paused ()
virtual void on_started ()
virtual void on_marker_reached (const Glib::ustring& marker_name, int frame_num)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Timelinewrap (ClutterTimeline* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Constructor & Destructor Documentation

virtual Clutter::Timeline::~Timeline ( ) [virtual]
Clutter::Timeline::Timeline ( guint  msecs) [explicit, protected]

Creates a new Clutter::Timeline with a duration of msecs.

Since cluttermm 0.6:
Parameters:
msecsDuration of the timeline in milliseconds.
Returns:
The newly created Clutter::Timeline instance. Use Glib::object_unref() when done using it.

Member Function Documentation

void Clutter::Timeline::add_marker_at_time ( const Glib::ustring &  marker_name,
guint  msecs 
)

Adds a named marker that will be hit when the timeline has been running for msecs milliseconds.

Markers are unique string identifiers for a given time. Once timeline reaches msecs, it will emit a ::marker-reached signal for each marker attached to that time.

A marker can be removed with remove_marker(). The timeline can be advanced to a marker using advance_to_marker().

Since cluttermm 0.8:
Parameters:
marker_nameThe unique name for this marker.
msecsPosition of the marker in milliseconds.
void Clutter::Timeline::advance ( guint  frame_num)

Advance timeline to the requested point.

The point is given as a time in milliseconds since the timeline started.

<note>The timeline will not emit the Clutter::Timeline::new-frame signal for the given time. The first ::new-frame signal after the call to advance() will be emit the skipped markers. </note>

Parameters:
msecsTime to advance to.
void Clutter::Timeline::advance_to_marker ( const Glib::ustring &  marker_name)

Advances timeline to the time of the given marker_name.

<note>Like advance(), this function will not emit the Clutter::Timeline::new-frame for the time where marker_name is set, nor it will emit Clutter::Timeline::marker-reached for marker_name.</note>

Since cluttermm 0.8:
Parameters:
marker_nameThe name of the marker.
Glib::RefPtr<Timeline> Clutter::Timeline::clone ( ) const

Create a new Clutter::Timeline instance which has property values matching that of supplied timeline.

The cloned timeline will not be started and will not be positioned to the current position of timeline: you will have to start it with start().

Since cluttermm 0.4:
Returns:
A new Clutter::Timeline, cloned from timeline.
static Glib::RefPtr<Timeline> Clutter::Timeline::create ( guint  msecs) [static]
guint Clutter::Timeline::get_delay ( ) const

Retrieves the delay set using set_delay().

Since cluttermm 0.4:
Returns:
The delay in milliseconds.
guint Clutter::Timeline::get_delta ( ) const

Retrieves the amount of time elapsed since the last ClutterTimeline::new-frame signal.

This function is only useful inside handlers for the ::new-frame signal, and its behaviour is undefined if the timeline is not playing.

Since cluttermm 0.6:
Returns:
The amount of time in milliseconds elapsed since the last frame.
TimelineDirection Clutter::Timeline::get_direction ( ) const

Retrieves the direction of the timeline set with set_direction().

Since cluttermm 0.6:
Returns:
The direction of the timeline.
guint Clutter::Timeline::get_duration ( ) const

Retrieves the duration of a Clutter::Timeline in milliseconds.

See set_duration().

Since cluttermm 0.6:
Returns:
The duration of the timeline, in milliseconds.
guint Clutter::Timeline::get_elapsed_time ( ) const

Request the current time position of the timeline.

Returns:
Current elapsed time in milliseconds.
bool Clutter::Timeline::get_loop ( ) const

Gets whether timeline is looping.

Returns:
true if the timeline is looping.
double Clutter::Timeline::get_progress ( ) const

The position of the timeline in a [0, 1] interval.

Since cluttermm 0.6:
Returns:
The position of the timeline.
const ClutterTimeline* Clutter::Timeline::gobj ( ) const [inline]

Provides access to the underlying C GObject.

ClutterTimeline* Clutter::Timeline::gobj ( ) [inline]

Provides access to the underlying C GObject.

ClutterTimeline* Clutter::Timeline::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Clutter::Timeline::has_marker ( const Glib::ustring &  marker_name)

Checks whether timeline has a marker set with the given name.

Since cluttermm 0.8:
Parameters:
marker_nameThe name of the marker.
Returns:
true if the marker was found.
bool Clutter::Timeline::is_playing ( ) const

Queries state of a Clutter::Timeline.

Returns:
true if timeline is currently playing.
std::vector<Glib::ustring> Clutter::Timeline::list_markers ( int  frame_num) const

Retrieves the list of markers at time msecs.

If frame_num is a negative integer, all the markers attached to timeline will be returned.

Since cluttermm 0.8:
Parameters:
msecsThe time to check, or -1.
n_markersThe number of markers returned.
Returns:
A newly allocated, 0 terminated string array containing the names of the markers. Use Glib::strfreev() when done.
virtual void Clutter::Timeline::on_completed ( ) [protected, virtual]
virtual void Clutter::Timeline::on_marker_reached ( const Glib::ustring &  marker_name,
int  frame_num 
) [protected, virtual]
virtual void Clutter::Timeline::on_new_frame ( int  fram_num) [protected, virtual]
virtual void Clutter::Timeline::on_paused ( ) [protected, virtual]
virtual void Clutter::Timeline::on_started ( ) [protected, virtual]
void Clutter::Timeline::pause ( )

Pauses the Clutter::Timeline on current frame.

Glib::PropertyProxy<guint> Clutter::Timeline::property_delay ( )

Delay before start.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<guint> Clutter::Timeline::property_delay ( ) const

Delay before start.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<TimelineDirection> Clutter::Timeline::property_direction ( ) const

Direction of the timeline.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<TimelineDirection> Clutter::Timeline::property_direction ( )

Direction of the timeline.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<guint> Clutter::Timeline::property_duration ( )

Duration of the timeline in milliseconds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<guint> Clutter::Timeline::property_duration ( ) const

Duration of the timeline in milliseconds.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Timeline::property_loop ( ) const

Should the timeline automatically restart.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Timeline::property_loop ( )

Should the timeline automatically restart.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
void Clutter::Timeline::remove_marker ( const Glib::ustring &  marker_name)

Removes marker_name, if found, from timeline.

Since cluttermm 0.8:
Parameters:
marker_nameThe name of the marker to remove.
void Clutter::Timeline::rewind ( )

Rewinds Clutter::Timeline to the first frame if its direction is Clutter::TIMELINE_FORWARD and the last frame if it is Clutter::TIMELINE_BACKWARD.

void Clutter::Timeline::set_delay ( guint  msecs)

Sets the delay, in milliseconds, before timeline should start.

Since cluttermm 0.4:
Parameters:
msecsDelay in milliseconds.
void Clutter::Timeline::set_direction ( TimelineDirection  direction)

Sets the direction of timeline, either Clutter::TIMELINE_FORWARD or Clutter::TIMELINE_BACKWARD.

Since cluttermm 0.6:
Parameters:
directionThe direction of the timeline.
void Clutter::Timeline::set_duration ( guint  msecs)

Sets the duration of the timeline, in milliseconds.

The speed of the timeline depends on the ClutterTimeline:fps setting.

Since cluttermm 0.6:
Parameters:
msecsDuration of the timeline in milliseconds.
void Clutter::Timeline::set_loop ( bool  loop = true)

Sets whether timeline should loop.

Parameters:
looptrue for enable looping.
Glib::SignalProxy0< void > Clutter::Timeline::signal_completed ( )
Prototype:
void on_my_completed()
Glib::SignalProxy2< void,const Glib::ustring&,int > Clutter::Timeline::signal_marker_reached ( )
Prototype:
void on_my_marker_reached(const Glib::ustring& marker_name, int frame_num)
Glib::SignalProxy1< void,int > Clutter::Timeline::signal_new_frame ( )
Prototype:
void on_my_new_frame(int fram_num)
Glib::SignalProxy0< void > Clutter::Timeline::signal_paused ( )
Prototype:
void on_my_paused()
Glib::SignalProxy0< void > Clutter::Timeline::signal_started ( )
Prototype:
void on_my_started()
void Clutter::Timeline::skip ( guint  n_frames)

Advance timeline by the requested time in milliseconds.

Parameters:
msecsAmount of time to skip.
void Clutter::Timeline::start ( )

Starts the Clutter::Timeline playing.

void Clutter::Timeline::stop ( )

Stops the Clutter::Timeline and moves to frame 0.


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Timeline > wrap ( ClutterTimeline *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

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