]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/fl/antiflickpl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas (@Lithuania)
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __ANTIFLICKPL_G__
13 #define __ANTIFLICKPL_G__
16 #pragma interface "antiflickpl.h"
19 #include "wx/fl/controlbar.h"
21 class cbAntiflickerPlugin
: public cbPluginBase
23 DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin
)
25 // double-buffers are shared "resource" among all instances of
26 // antiflicker plugin within the application
28 // TODO:: locking should be implemented, for multithreaded GUIs
30 static wxBitmap
* mpVertBuf
;
31 static wxBitmap
* mpHorizBuf
;
32 static wxMemoryDC
* mpVertBufDc
;
33 static wxMemoryDC
* mpHorizBufDc
;
37 wxDC
* mpLRUBufDc
; // last-reacently-used buffer
38 wxRect mLRUArea
; // last-reacently-used area
41 // returns NULL, if sutable buffer is not present
42 wxDC
* FindSuitableBuffer( const wxRect
& forArea
);
43 wxDC
* AllocNewBuffer( const wxRect
& forArea
);
49 cbAntiflickerPlugin(void);
51 cbAntiflickerPlugin( wxFrameLayout
* pPanel
, int paneMask
= wxALL_PANES
);
53 virtual ~cbAntiflickerPlugin();
55 // handlers for plugin events
57 void OnStartDrawInArea ( cbStartDrawInAreaEvent
& event
);
58 void OnFinishDrawInArea( cbFinishDrawInAreaEvent
& event
);
63 #endif /* __ANTIFLICKPL_G__ */