This patch allows FL to be build as a DLL with the VC project files, I was only able to at chief it with the VC projects because the make file for building libs doesn't have any rule to build DLLs (at least I didn't see how to do it). However the FL demo applications can be build using FL in DLL form with MSVC project files and VC make files (as mentioned before the FL DLL it self can only be build using VC projects). This patch includes 2 files; 1 to change current FL files to work in DLL form and 1 extra include file that needs to be added in the FL include directory. Small note: if you want to use FL as a DLL you need to use wxWin as a DLL. Thanks, Hans. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
87 lines
2.1 KiB
C++
87 lines
2.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: antiflickpl.h
|
|
// Purpose: Double-buffering plugin class for reducing flicker
|
|
// Author: Aleksandras Gluchovas (@Lithuania)
|
|
// Modified by:
|
|
// Created: 23/10/98
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) Aleksandras Gluchovas
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef __ANTIFLICKPL_G__
|
|
#define __ANTIFLICKPL_G__
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
#pragma interface "antiflickpl.h"
|
|
#endif
|
|
|
|
#include "wx/fl/controlbar.h"
|
|
|
|
/*
|
|
Implements double-buffering to reduce flicker.
|
|
Bitmap and memory DC buffers are shared 'resources' among all instances of
|
|
antiflicker plugins within the application.
|
|
|
|
Locking for multithreaded applications is not yet implemented.
|
|
*/
|
|
|
|
class WXFL_DECLSPEC cbAntiflickerPlugin : public cbPluginBase
|
|
{
|
|
DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin )
|
|
protected:
|
|
|
|
static wxBitmap* mpVertBuf;
|
|
static wxBitmap* mpHorizBuf;
|
|
static wxMemoryDC* mpVertBufDc;
|
|
static wxMemoryDC* mpHorizBufDc;
|
|
|
|
static int mRefCount;
|
|
|
|
wxDC* mpLRUBufDc; // last-recently-used buffer
|
|
wxRect mLRUArea; // last-recently-used area
|
|
|
|
protected:
|
|
// Finds a suitable buffer. Returns NULL if a suitable buffer is not present.
|
|
|
|
wxDC* FindSuitableBuffer( const wxRect& forArea );
|
|
|
|
// Allocates a suitable buffer.
|
|
|
|
wxDC* AllocNewBuffer( const wxRect& forArea );
|
|
|
|
// Gets the window device context.
|
|
|
|
wxDC& GetWindowDC();
|
|
|
|
// Gets the client device context.
|
|
|
|
wxDC& GetClientDC();
|
|
public:
|
|
|
|
// Default constructor.
|
|
|
|
cbAntiflickerPlugin(void);
|
|
|
|
// Constructor taking frame layout panel, and pane mask.
|
|
|
|
cbAntiflickerPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
|
|
|
// Destructor.
|
|
|
|
virtual ~cbAntiflickerPlugin();
|
|
|
|
// Handler for plugin event.
|
|
|
|
void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
|
|
|
|
// Handler for plugin event.
|
|
|
|
void OnFinishDrawInArea( cbFinishDrawInAreaEvent& event );
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
};
|
|
|
|
#endif /* __ANTIFLICKPL_G__ */
|
|
|