]>
git.saurik.com Git - wxWidgets.git/blob - utils/framelayout/src/hintanimpl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __HINTANIMPL_G__
13 #define __HINTANIMPL_G__
15 #include "controlbar.h"
19 class cbHintAnimTimer
;
21 class cbHintAnimationPlugin
: public cbPluginBase
23 DECLARE_DYNAMIC_CLASS( cbHintAnimationPlugin
)
25 friend class cbHintAnimTimer
;
27 wxScreenDC
* mpScrDc
; // created while tracking hint-rect
28 cbHintAnimTimer
* mpAnimTimer
;
30 // FOR NOW:: try it without mutually exculisve locks
31 volatile wxRect mCurRect
;
44 int mMorphDelay
; // delay between frames in miliseconds, default: 20
45 int mMaxFrames
; // number of iterations for hint morphing, default: 30
46 // (morph duration = mMorphDelay * mMaxFrames msec)
48 int mInClientHintBorder
; // default: 4 pixels
50 bool mAccelerationOn
; // TRUE, if morph accelerates, otherwise morph
51 // speed is constant. Default: TRUE
53 // TBD:: get/set methods for above members
58 void DrawHintRect ( wxRect
& rect
, bool isInClientRect
);
59 void EraseHintRect( wxRect
& rect
, bool isInClientRect
);
61 void FinishTracking();
63 void DoDrawHintRect( wxRect
& rect
, bool isInClientRect
);
65 void RectToScr( wxRect
& frameRect
, wxRect
& scrRect
);
68 cbHintAnimationPlugin(void);
70 ~cbHintAnimationPlugin();
72 cbHintAnimationPlugin( wxFrameLayout
* pPanel
, int paneMask
= wxALL_PANES
);
74 void OnDrawHintRect( cbDrawHintRectEvent
& event
);
88 class cbHintAnimTimer
: public wxTimer
92 friend class cbHintAnimationPlugin
;
96 MorphInfoT mUpperLeft
;
97 MorphInfoT mLowerRight
;
102 cbHintAnimationPlugin
* mpPl
;
104 void MorphPoint( wxPoint
& origin
, MorphInfoT
& info
, wxPoint
& point
);
108 cbHintAnimTimer(void);
110 virtual void Notify(void);
112 virtual bool Init( cbHintAnimationPlugin
* pAnimPl
, bool reinit
);