]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/fl/antiflickpl.h
Added MSW toplevel.cpp and regenerated makefiles and such.
[wxWidgets.git] / contrib / include / wx / fl / antiflickpl.h
CommitLineData
8e08b761
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: No names yet.
3// Purpose: Contrib. demo
4// Author: Aleksandras Gluchovas (@Lithuania)
5// Modified by:
6// Created: 23/10/98
7// RCS-ID: $Id$
8// Copyright: (c) Aleksandras Gluchovas
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __ANTIFLICKPL_G__
13#define __ANTIFLICKPL_G__
14
15#ifdef __GNUG__
16 #pragma interface "antiflickpl.h"
17#endif
18
19#include "wx/fl/controlbar.h"
20
21class cbAntiflickerPlugin : public cbPluginBase
22{
23 DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin )
24protected:
25 // double-buffers are shared "resource" among all instances of
26 // antiflicker plugin within the application
27 //
28 // TODO:: locking should be implemented, for multithreaded GUIs
29
30 static wxBitmap* mpVertBuf;
31 static wxBitmap* mpHorizBuf;
32 static wxMemoryDC* mpVertBufDc;
33 static wxMemoryDC* mpHorizBufDc;
34
35 static int mRefCount;
36
37 wxDC* mpLRUBufDc; // last-reacently-used buffer
38 wxRect mLRUArea; // last-reacently-used area
39
40protected:
41 // returns NULL, if sutable buffer is not present
42 wxDC* FindSuitableBuffer( const wxRect& forArea );
43 wxDC* AllocNewBuffer( const wxRect& forArea );
44 wxDC& GetWindowDC();
45
46 wxDC& GetClientDC();
47public:
48
49 cbAntiflickerPlugin(void);
50
51 cbAntiflickerPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
52
53 virtual ~cbAntiflickerPlugin();
54
55 // handlers for plugin events
56
57 void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
58 void OnFinishDrawInArea( cbFinishDrawInAreaEvent& event );
59
60 DECLARE_EVENT_TABLE()
61};
62
63#endif /* __ANTIFLICKPL_G__ */
64