]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/fl/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__
16 #pragma interface "hintanimpl.h"
19 #include "wx/fl/controlbar.h"
23 class cbHintAnimTimer
;
25 class cbHintAnimationPlugin
: public cbPluginBase
27 DECLARE_DYNAMIC_CLASS( cbHintAnimationPlugin
)
29 friend class cbHintAnimTimer
;
31 wxScreenDC
* mpScrDc
; // created while tracking hint-rect
32 cbHintAnimTimer
* mpAnimTimer
;
34 // FOR NOW:: try it without mutually exculisve locks
35 volatile wxRect mCurRect
;
48 int mMorphDelay
; // delay between frames in miliseconds, default: 20
49 int mMaxFrames
; // number of iterations for hint morphing, default: 30
50 // (morph duration = mMorphDelay * mMaxFrames msec)
52 int mInClientHintBorder
; // default: 4 pixels
54 bool mAccelerationOn
; // TRUE, if morph accelerates, otherwise morph
55 // speed is constant. Default: TRUE
57 // TBD:: get/set methods for above members
62 void DrawHintRect ( wxRect
& rect
, bool isInClientRect
);
63 void EraseHintRect( wxRect
& rect
, bool isInClientRect
);
65 void FinishTracking();
67 void DoDrawHintRect( wxRect
& rect
, bool isInClientRect
);
69 void RectToScr( wxRect
& frameRect
, wxRect
& scrRect
);
72 cbHintAnimationPlugin(void);
74 ~cbHintAnimationPlugin();
76 cbHintAnimationPlugin( wxFrameLayout
* pPanel
, int paneMask
= wxALL_PANES
);
78 void OnDrawHintRect( cbDrawHintRectEvent
& event
);
92 class cbHintAnimTimer
: public wxTimer
96 friend class cbHintAnimationPlugin
;
100 MorphInfoT mUpperLeft
;
101 MorphInfoT mLowerRight
;
106 cbHintAnimationPlugin
* mpPl
;
108 void MorphPoint( wxPoint
& origin
, MorphInfoT
& info
, wxPoint
& point
);
112 cbHintAnimTimer(void);
114 virtual void Notify(void);
116 virtual bool Init( cbHintAnimationPlugin
* pAnimPl
, bool reinit
);
119 #endif /* __HINTANIMPL_G__ */