![]() |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Named property class. More...
#include <ilviews/util/animator.h>
Public Types | |
| enum | IlvAnimationMode { IlvAnimationNone, IlvAnimationForward, IlvAnimationBackward, IlvAnimationForwardOnce, IlvAnimationBackwardOnce } |
This enumeration defines the possible values for the animation mode of an IlvAnimator object. More... | |
Public Member Functions | |
| IlvAnimator (IlSymbol *name, IlvAnimationMode mode=IlvAnimationForward, IlUInt period=100) | |
| Constructor. More... | |
| virtual void | animate () |
| Called to animate the animator. More... | |
| void | changeState (IlUInt state, IlBoolean redraw=IlTrue) |
| Changes the animator state. More... | |
| IlvAnimationMode | getAnimationMode () const |
| Returns the animation mode of the animator. More... | |
| IlUInt | getPeriod () const |
| Returns the animation period of the animator. More... | |
| IlUInt | getState () const |
| Returns the animator state. More... | |
| virtual IlUInt | getStatesCount () const =0 |
| Returns the number of states of the animator. More... | |
| virtual void | initReDraws () const =0 |
| Called to begin a redraw session. More... | |
| virtual void | invalidateRegion () const =0 |
| Called to invalidate the area affected by the animator. More... | |
| virtual IlBoolean | isLastState (IlUInt state) const |
| Returns a Boolean value indicating whether the specified state is the last one. More... | |
| virtual IlUInt | nextState (IlUInt state) const |
| Returns the animator state that must be set after a given state. More... | |
| virtual void | reDraw () const |
| Called to redraw the animator. More... | |
| virtual void | reDrawViews () const =0 |
| Called to finish a redraw session. More... | |
| void | setAnimationMode (IlvAnimationMode mode) |
| Sets the animation mode of the animator. More... | |
| void | setAnimationMode (IlvAnimationMode mode, IlUInt period) |
| Sets the animation mode and the period of the animator. More... | |
| void | setState (IlUInt state) |
| Sets the animator state. More... | |
| virtual void | stateChanged (IlUInt newState, IlUInt oldState) |
Called by IlvAnimator::changeState each time the animator state changes. More... | |
Public Member Functions inherited from IlvNamedProperty | |
| IlvNamedProperty (IlSymbol *) | |
| Constructor. More... | |
| IlvNamedProperty (const IlvNamedProperty &source) | |
| Constructor. More... | |
| IlvNamedProperty * | copy () const =0 |
| Copies the property. More... | |
| const char * | getName () const |
| Gets the name of the property. More... | |
| IlSymbol * | getSymbol () const |
| Gets the name of the property. More... | |
| virtual IlBoolean | isPersistent () const |
| Specifies whether the property must save itself. More... | |
| void | write (IlvOutputFile &stream) const =0 |
| Saves the description of the property. More... | |
Additional Inherited Members | |
Public Attributes inherited from IlvNamedProperty | |
| IlvNamedProperty *IlvInputFile & | stream |
| Reads an instance of the property class. More... | |
Named property class.
Library: views
IlvAnimator is a subclass of IlvNamedProperty that deals with animation. You can use it to animate any object that can be connected to a named property (IlvGraphic, IlvGadgetItem, IlvPane, IlvNotebookPage). Once started the animator calls the virtual method IlvAnimator::animate to animate the object.
IlvBitmapAnimator, IlvGraphicAnimator This enumeration defines the possible values for the animation mode of an IlvAnimator object.
IlvAnimator::setAnimationMode() | IlvAnimator::IlvAnimator | ( | IlSymbol * | name, |
| IlvAnimationMode | mode = IlvAnimationForward, |
||
| IlUInt | period = 100 |
||
| ) |
Constructor.
Initializes a new instance of the IlvAnimator class. The animator will start when it is connected to any object.
| name | The animator name. |
| mode | The animation mode. |
| period | The animator period. |
|
virtual |
Called to animate the animator.
The default implementation calls IlvAnimator::changeState with the result of IlvAnimator::nextState as new state, and with redraw set to IlTrue.
getState(), nextState(), setState(), changeState() Reimplemented in IlvGraphicAnimator.
Changes the animator state.
This method calls IlvAnimator::setState to change the state, and then calls IlvAnimator::stateChanged.
| state | The new animator state. |
| redraw | A Boolean specifying whether the animator should be redrawn. |
getState(), nextState(), setState(), reDrawViews() | IlvAnimationMode IlvAnimator::getAnimationMode | ( | ) | const |
Returns the animation mode of the animator.
| IlUInt IlvAnimator::getPeriod | ( | ) | const |
Returns the animation period of the animator.
The animation period is the period between two calls TO the IlvAnimator::animate method.
| IlUInt IlvAnimator::getState | ( | ) | const |
Returns the animator state.
The animator state is a value that represents the state of the animator. The default value is 0.
setState(), nextState(), changeState()
|
pure virtual |
Returns the number of states of the animator.
You must redefine this method in a subclass.
nextState(), changeState() Implemented in IlvBitmapAnimator.
|
pure virtual |
Called to begin a redraw session.
You must redefine this method in a subclass.
reDraw(), invalidateRegion(), reDrawViews() Implemented in IlvGraphicAnimator.
|
pure virtual |
Called to invalidate the area affected by the animator.
You must redefine this method in a subclass.
reDraw(), initReDraws(), reDrawViews() Implemented in IlvGraphicAnimator.
Returns a Boolean value indicating whether the specified state is the last one.
The default implementation compares state to the result of IlvAnimator::getStatesCount(). You can override this function in your own subclass if you do not know the total number of states that the animator has.
| state | The state. |
getStatesCount(), nextState(), changeState() Reimplemented in IlvBitmapAnimator.
Returns the animator state that must be set after a given state.
The default implementation uses the animation mode to increment (IlvAnimationForward) or decrement (IlvAnimationBackward) the state. You may override this method to implement your own state automate.
| state | The animator state. |
IlvBadIndex is returned, the animator stops. animate(), changeState()
|
virtual |
Called to redraw the animator.
The default implementation calls IlvAnimator::initReDraws(), then IlvAnimator::invalidateRegion(), and finally reDrawViews().
initReDraws(), invalidateRegion(), reDrawViews()
|
pure virtual |
Called to finish a redraw session.
You must redefine this method in a subclass.
reDraw(), initReDraws(), invalidateRegion() Implemented in IlvGraphicAnimator.
| void IlvAnimator::setAnimationMode | ( | IlvAnimationMode | mode | ) |
Sets the animation mode of the animator.
This method does not change the animation period.
| mode | The new animation mode. |
| void IlvAnimator::setAnimationMode | ( | IlvAnimationMode | mode, |
| IlUInt | period | ||
| ) |
Sets the animation mode and the period of the animator.
| mode | The new animation mode. |
| period | The new animation period. |
| void IlvAnimator::setState | ( | IlUInt | state | ) |
Sets the animator state.
This method does not call any other method.
| state | The new animator state. |
getState(), nextState(), changeState() Called by IlvAnimator::changeState each time the animator state changes.
The default implementation does nothing.
| newState | The new animator state. |
| oldState | The previous animator state. |
getState(), nextState(), changeState() Reimplemented in IlvGraphicAnimator, and IlvBitmapAnimator.
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.