ASPiK SDK
cautoanimation.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __cautoanimation__
6 #define __cautoanimation__
7 
8 #include "ccontrol.h"
9 
10 namespace VSTGUI {
11 
12 //-----------------------------------------------------------------------------
13 // CAutoAnimation Declaration
16 //-----------------------------------------------------------------------------
18 {
19 public:
20  CAutoAnimation (const CRect& size, IControlListener* listener, int32_t tag, CBitmap* background, const CPoint& offset = CPoint (0, 0));
21  CAutoAnimation (const CRect& size, IControlListener* listener, int32_t tag, int32_t subPixmaps, CCoord heightOfOneImage, CBitmap* background, const CPoint& offset = CPoint (0, 0));
22  CAutoAnimation (const CAutoAnimation& autoAnimation);
23 
24  void draw (CDrawContext*) override;
25  CMouseEventResult onMouseDown (CPoint& where, const CButtonState& buttons) override;
26 
27  //-----------------------------------------------------------------------------
29  //-----------------------------------------------------------------------------
31  virtual void openWindow (void);
32  virtual void closeWindow (void);
33 
34  virtual void nextPixmap (void);
35  virtual void previousPixmap (void);
36 
37  bool isWindowOpened () const { return bWindowOpened; }
39 
40  void setNumSubPixmaps (int32_t numSubPixmaps) override { IMultiBitmapControl::setNumSubPixmaps (numSubPixmaps); invalid (); }
41 
42  CLASS_METHODS(CAutoAnimation, CControl)
43 protected:
44  ~CAutoAnimation () noexcept override = default;
45 
46  CPoint offset;
47 
48  CCoord totalHeightOfBitmap;
49 
50  bool bWindowOpened;
51 };
52 
53 } // namespace
54 
55 #endif
Rect structure.
Definition: crect.h:17
CAutoAnimation(const CRect &size, IControlListener *listener, int32_t tag, CBitmap *background, const CPoint &offset=CPoint(0, 0))
Definition: cautoanimation.cpp:29
virtual void previousPixmap(void)
the previous sub bitmap should be displayed
Definition: cautoanimation.cpp:138
Definition: xmlparse.c:181
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
virtual void nextPixmap(void)
the next sub bitmap should be displayed
Definition: cautoanimation.cpp:130
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: cautoanimation.h:17
Definition: customcontrols.cpp:8
base class of all VSTGUI controls
Definition: ccontrol.h:76
Button and Modifier state.
Definition: cbuttonstate.h:34
virtual void closeWindow(void)
disable drawing
Definition: cautoanimation.cpp:124
virtual void invalid()
mark whole view as invalid
Definition: cview.h:63
virtual void openWindow(void)
enabled drawing
Definition: cautoanimation.cpp:118
Point structure.
Definition: cpoint.h:17
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: cautoanimation.cpp:93
void draw(CDrawContext *) override
called if the view should draw itself
Definition: cautoanimation.cpp:76
Definition: icontrollistener.h:14
interface for controls with sub images
Definition: ccontrol.h:182