Detailed Description

This class helps the MMSGUI and user specific applications to get smooth animations.

There are three callbacks: onBeforeAnimation, onAnimation and onAfterAnimation. At least the onAnimation callback should be connected. This callback will be called for each frame which is to draw. The onBeforeAnimation callback can be used to setup something. The onAfterAnimation callback will be called, if the animation is finished. The initiator can be blocked during the animation (see start(false)). But it is also possible that the animation is running in a separate thread (see start(true)).

The animation will be stopped, if the maximum offset is exceeded. Additionally you can set the sequence mode and a sequence range. With these parameters you have influence to the return value of getOffset().

Parameters:

max_offset

maximum offset (2..n), default 0 means that no maximum is set if maximum offset is not set (value 0), the seq_mode and seq_range will be ignored

seq_mode

sequence mode, default is MMSPULSER_SEQ_LINEAR

seq_range

the seq_range for the curve calculation (2..max_offset), default 0 is equal to max_offset

Returns:

true, if parameters are accepted

Note:

If your onAnimation callback returns false, the Animation will be stopped at any time.

You HAVE TO disconnect myobject from onBeforeAnimation BEFORE myobject will be deleted!!! Else an abnormal program termination can occur. You HAVE TO call the disconnect() method of sigc::connection explicitly. The destructor will NOT do this!!!

You HAVE TO disconnect myobject from onAnimation BEFORE myobject will be deleted!!! Else an abnormal program termination can occur. You HAVE TO call the disconnect() method of sigc::connection explicitly. The destructor will NOT do this!!!

You HAVE TO disconnect myobject from onAfterAnimation BEFORE myobject will be deleted!!! Else an abnormal program termination can occur. You HAVE TO call the disconnect() method of sigc::connection explicitly. The destructor will NOT do this!!!