]>
git.saurik.com Git - wxWidgets.git/blob - utils/framelayout/src/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__
15 #include "controlbar.h"
17 class cbAntiflickerPlugin
: public cbPluginBase
19 DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin
)
21 // double-buffers are shared "resource" among all instances of
22 // antiflicker plugin within the application
24 // TODO:: locking should be implemented, for multithreaded GUIs
26 static wxBitmap
* mpVertBuf
;
27 static wxBitmap
* mpHorizBuf
;
28 static wxMemoryDC
* mpVertBufDc
;
29 static wxMemoryDC
* mpHorizBufDc
;
33 wxDC
* mpLRUBufDc
; // last-reacently-used buffer
34 wxRect mLRUArea
; // last-reacently-used area
37 // returns NULL, if sutable buffer is not present
38 wxDC
* FindSuitableBuffer( const wxRect
& forArea
);
39 wxDC
* AllocNewBuffer( const wxRect
& forArea
);
45 cbAntiflickerPlugin(void);
47 cbAntiflickerPlugin( wxFrameLayout
* pPanel
, int paneMask
= wxALL_PANES
);
49 virtual ~cbAntiflickerPlugin();
51 // handlers for plugin events
53 void OnStartDrawInArea ( cbStartDrawInAreaEvent
& event
);
54 void OnFinishDrawInArea( cbFinishDrawInAreaEvent
& event
);