Animation Control Class
Brief Introduction to Animation Control
Animation control provides rich visual experience to the users through drawing and displaying image group and GIF dynamic images. Animation control in mGNCS is derived from animation control of MiniGUI 3.0, and based on it, support to image group play and GIF image play control is added. At the same time, users can control the play speed through setting image play interval.
Animate class hierarchical relationship:
Control creating method
Automatic creation: through interface designer in miniStudio, drag corresponding animation control, select
GIFimage or image directory that need to load in the property column, and miniStudio will automatically create control and provides visual control configuration, at the same time, creation codes are generated automatically.Manual generation: according to mGNCS control creating process, through programming, corresponding control window class ID is imported, and control is generated. Manual programming sets control property and event handling.
mAnimate
Control window class:
NCSCTRL_ANIMATEControl English name: Animate
Brief introduction: Animation control. Display drawn dynamic images through loading different image processing objects on the control.
Schematic diagram:
Style of mAnimate
mAnimateIt is inherited from the style of mStatic
Style name
miniStudio property name
Explanation
NCSS_ANMT_AUTOLOOP
Loop
Set animation play as automatic circle or not. When setting as True, the images are played in circle. When setting as False, it will stop after the images are all played.
NCSS_ANMT_SCALE
Scale->ImageScaled
Set the image play area as control region area, and the images can be played enlarged or reduced
NCSS_ANMT_AUTOFIT
Scale->AutoFit
Set the control region automatic matched as image area
NCSS_ANMT_AUTOPLAY
Autoplay
Set images as automatic play or not. When it is True, the images are played automatically. When it is False, it is necessary for the users to send order to control the play
Property of mAnimate
mAnimateIt is inherited from the property of mStatic
Property
miniStudio property name
Type
Authority
Explanation
NCSP_ANMT_GIFFILE
GIFFile
String
RW
Name of the GIF image file loaded by the animation control
NCSP_ANMT_DIR
Dir
String
RW
Name if the directory loaded by the animation control. The control loads all the images in the directory. Image play is according to the first letter ascii code sequence of the images supported
NCSP_ANMT_INTERVAL
Interval
int
RW
Time interval between the frames when the images are played
Event of mAnimate
mAnimateIt is inherited from the event of mStatic
Renderer of mAnimate
mAnimateFor the drawing of non client area, please refer to the renderer of mStatic
Method of mAnimate
mAnimatencsAnimateStart
Parameter:
self -- animation control pointer that needs operation
Explanation: Start to play the animation control that self corresponds to. If the animation control is being played, then return to the animation starting point to begin playing.
Example:
ncsAnimatePauseResume
Parameter:
self -- animation control pointer that needs operation
Explanation: If the current animation is paused, this method will continue to play the animation. If the animation is in play, this method will pause to the animation.
Example:
ncsAnimateStop
Parameter:
self -- animation control pointer that needs operation
Explanation: Stop the animation, and reset the animation back to the first frame.
Example:
Programming Example of mAnimate
mAnimateList 1 animation.c
Set loading image
Set key information
Set display interface template
<< Edit Box and Derived Control Classes | Table of Contents | Other Advanced Control Classes >>
Last updated