Remove wxMGL port.

The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-01-15 14:46:41 +00:00
parent 4ff56dd152
commit 0e1f8ea4a3
210 changed files with 394 additions and 19282 deletions

View File

@@ -592,10 +592,10 @@ public:
// ------------------------------------------------------------------------
// Get display mode that is used use. This is only used in framebuffer
// wxWin ports (such as wxMGL or wxDFB).
// wxWin ports such as wxDFB.
virtual wxVideoMode GetDisplayMode() const;
// Set display mode to use. This is only used in framebuffer wxWin
// ports (such as wxMGL or wxDFB). This method should be called from
// ports such as wxDFB. This method should be called from
// wxApp::OnInitGui
virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
@@ -685,8 +685,6 @@ protected:
#include "wx/msw/app.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/app.h"
#elif defined(__WXMGL__)
#include "wx/mgl/app.h"
#elif defined(__WXDFB__)
#include "wx/dfb/app.h"
#elif defined(__WXGTK20__)

View File

@@ -68,8 +68,7 @@ protected:
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
};
#if defined(__WXMGL__) || \
defined(__WXDFB__) || \
#if defined(__WXDFB__) || \
defined(__WXMAC__) || \
defined(__WXGTK__) || \
defined(__WXCOCOA__) || \
@@ -252,9 +251,6 @@ protected:
#elif defined(__WXX11__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/bitmap.h"
#elif defined(__WXMGL__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/mgl/bitmap.h"
#elif defined(__WXDFB__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/dfb/bitmap.h"
@@ -284,7 +280,7 @@ ConvertToDisabled(unsigned char brightness) const
#endif // wxUSE_IMAGE
// we must include generic mask.h after wxBitmap definition
#if defined(__WXMGL__) || defined(__WXDFB__)
#if defined(__WXDFB__)
#define wxUSE_GENERIC_MASK 1
#else
#define wxUSE_GENERIC_MASK 0

View File

@@ -78,8 +78,6 @@ public:
#include "wx/gtk/brush.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/brush.h"
#elif defined(__WXMGL__)
#include "wx/mgl/brush.h"
#elif defined(__WXDFB__)
#include "wx/dfb/brush.h"
#elif defined(__WXMAC__)

View File

@@ -1213,8 +1213,6 @@
# include "wx/osx/chkconf.h"
#elif defined(__OS2__)
# include "wx/os2/chkconf.h"
#elif defined(__WXMGL__)
# include "wx/mgl/chkconf.h"
#elif defined(__WXDFB__)
# include "wx/dfb/chkconf.h"
#elif defined(__WXMOTIF__)

View File

@@ -160,8 +160,6 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
#include "wx/gtk1/clipbrd.h"
#elif defined(__WXX11__)
#include "wx/x11/clipbrd.h"
#elif defined(__WXMGL__)
#include "wx/mgl/clipbrd.h"
#elif defined(__WXMAC__)
#include "wx/osx/clipbrd.h"
#elif defined(__WXCOCOA__)

View File

@@ -221,8 +221,6 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#include "wx/gtk/colour.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/colour.h"
#elif defined(__WXMGL__)
#include "wx/generic/colour.h"
#elif defined(__WXDFB__)
#include "wx/generic/colour.h"
#elif defined(__WXX11__)

View File

@@ -49,9 +49,6 @@ public:
#elif defined(__WXX11__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/cursor.h"
#elif defined(__WXMGL__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/mgl/cursor.h"
#elif defined(__WXDFB__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/dfb/cursor.h"

View File

@@ -40,7 +40,6 @@
!defined(__WXOSX_IPHONE__) && \
!defined(__WXCOCOA__) && \
!defined(__X__) && \
!defined(__WXMGL__) && \
!defined(__WXDFB__) && \
!defined(__WXX11__) && \
wxUSE_GUI
@@ -3277,10 +3276,6 @@ typedef struct _PangoLayout PangoLayout;
typedef struct _PangoFontDescription PangoFontDescription;
#endif
#ifdef __WXMGL__
typedef struct window_t *WXWidget;
#endif /* MGL */
#ifdef __WXDFB__
/* DirectFB doesn't have the concept of non-TLW window, so use
something arbitrary */

View File

@@ -116,7 +116,6 @@ protected:
#include "wx/cocoa/dirdlg.h" // Native Cocoa
#elif defined(__WXMOTIF__) || \
defined(__WXX11__) || \
defined(__WXMGL__) || \
defined(__WXCOCOA__) || \
defined(__WXPM__)
#include "wx/generic/dirdlgg.h" // Other ports use generic implementation

View File

@@ -54,8 +54,6 @@ struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
xencoding;
#elif defined(wxHAS_UTF8_FONTS)
// ports using UTF-8 for text don't need encoding information for fonts
#elif defined(__WXMGL__)
int mglEncoding;
#else
#error "Unsupported toolkit"
#endif

View File

@@ -351,8 +351,6 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
#include "wx/gtk1/font.h"
#elif defined(__WXX11__)
#include "wx/x11/font.h"
#elif defined(__WXMGL__)
#include "wx/mgl/font.h"
#elif defined(__WXDFB__)
#include "wx/dfb/font.h"
#elif defined(__WXMAC__)

View File

@@ -176,9 +176,6 @@ enum wxStockCursor
#elif defined(__WXPM__)
// Load from a resource
#define wxICON(X) wxIcon(wxT(#X))
#elif defined(__WXMGL__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
#elif defined(__WXDFB__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
@@ -209,7 +206,6 @@ enum wxStockCursor
defined(__WXMOTIF__) || \
defined(__WXX11__) || \
defined(__WXMAC__) || \
defined(__WXMGL__) || \
defined(__WXDFB__) || \
defined(__WXCOCOA__)
// Initialize from an included XPM

View File

@@ -38,9 +38,6 @@
#elif defined(__WXX11__)
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"
#elif defined(__WXMGL__)
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
#include "wx/generic/icon.h"
#elif defined(__WXDFB__)
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/generic/icon.h"

View File

@@ -1,57 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/app.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_APP_H__
#define __WX_APP_H__
#include "wx/frame.h"
#include "wx/icon.h"
#include "wx/vidmode.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxApp;
class WXDLLIMPEXP_FWD_BASE wxLog;
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
//-----------------------------------------------------------------------------
// wxApp
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxApp: public wxAppBase
{
public:
wxApp();
virtual ~wxApp();
/* override for altering the way wxGTK intializes the GUI
* (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
* default. when overriding this method, the code in it is likely to be
* platform dependent, otherwise use OnInit(). */
virtual bool OnInitGui();
// override base class (pure) virtuals
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp();
virtual void Exit();
virtual void WakeUpIdle();
virtual wxVideoMode GetDisplayMode() const { return m_displayMode; }
virtual bool SetDisplayMode(const wxVideoMode& mode);
private:
DECLARE_DYNAMIC_CLASS(wxApp)
wxVideoMode m_displayMode;
};
#endif // __WX_APP_H__

View File

@@ -1,92 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/bitmap.h
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_BITMAP_H__
#define __WX_BITMAP_H__
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class MGLDevCtx;
struct bitmap_t;
//-----------------------------------------------------------------------------
// wxBitmap
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
{
public:
wxBitmap() {}
wxBitmap(int width, int height, int depth = -1)
{ Create(width, height, depth); }
wxBitmap(const wxSize& sz, int depth = -1)
{ Create(sz, depth); }
wxBitmap(const char bits[], int width, int height, int depth = 1);
wxBitmap(const char* const* bits);
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
wxBitmap(const wxImage& image, int depth = -1);
virtual ~wxBitmap() {}
bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
{ return Create(sz.GetWidth(), sz.GetHeight(), depth); }
virtual int GetHeight() const;
virtual int GetWidth() const;
virtual int GetDepth() const;
virtual wxImage ConvertToImage() const;
virtual wxMask *GetMask() const;
virtual void SetMask(wxMask *mask);
virtual wxBitmap GetSubBitmap(const wxRect& rect) const;
virtual bool SaveFile(const wxString &name, wxBitmapType type, const wxPalette *palette = NULL) const;
virtual bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
virtual wxPalette *GetPalette() const;
virtual void SetPalette(const wxPalette& palette);
// copies the contents and mask of the given (colour) icon to the bitmap
virtual bool CopyFromIcon(const wxIcon& icon);
static void InitStandardHandlers();
// implementation:
virtual void SetHeight(int height);
virtual void SetWidth(int width);
virtual void SetDepth(int depth);
virtual wxColour QuantizeColour(const wxColour& colour) const;
// get underlying native representation:
bitmap_t *GetMGLbitmap_t() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
// creates temporary DC for access to bitmap's data:
MGLDevCtx *CreateTmpDC() const;
// sets fg & bg colours for 1bit bitmaps:
void SetMonoPalette(const wxColour& fg, const wxColour& bg);
private:
DECLARE_DYNAMIC_CLASS(wxBitmap)
friend class wxDC;
friend class wxMemoryDC;
};
#endif // __WX_BITMAP_H__

View File

@@ -1,70 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/brush.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_BRUSH_H__
#define __WX_BRUSH_H__
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxBrush;
//-----------------------------------------------------------------------------
// wxBrush
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
{
public:
wxBrush() {}
wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
#endif
wxBrush(const wxBitmap &stippleBitmap);
bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const;
wxBrushStyle GetStyle() const;
wxColour GetColour() const;
wxBitmap *GetStipple() const;
void SetColour(const wxColour& col);
void SetColour(unsigned char r, unsigned char g, unsigned char b);
void SetStyle(wxBrushStyle style);
void SetStipple(const wxBitmap& stipple);
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxBrushStyle)style); }
#endif
// implementation:
void* GetMaskPattern() const;
void* GetPixPattern() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
private:
DECLARE_DYNAMIC_CLASS(wxBrush)
};
#endif // __WX_BRUSH_H__

View File

@@ -1,103 +0,0 @@
/*
* Name: wx/mgl/chkconf.h
* Purpose: Compiler-specific configuration checking
* Author: Julian Smart
* Modified by:
* Created: 01/02/97
* RCS-ID: $Id$
* Copyright: (c) Julian Smart
* Licence: wxWindows licence
*/
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
#ifndef _WX_MGL_CHKCONF_H_
#define _WX_MGL_CHKCONF_H_
#ifndef __WXUNIVERSAL__
# error "wxMGL cannot be built without wxUniversal"
#endif
/* wxPalette is always needed */
#if !wxUSE_PALETTE
# error "wxMGL requires wxUSE_PALETTE=1"
#endif
/*
wxDisplay is not implemented for OS/2, use stub common version instead.
*/
#if wxUSE_DISPLAY
# undef wxUSE_DISPLAY
# define wxUSE_DISPLAY 0
#endif /* wxUSE_DISPLAY */
#ifdef __WATCOMC__
/* Watcom builds for MGL port are setup.h driven and setup.h is
automatically generated from include/wx/setup_inc.h so we have
to disable here features not supported currently or enable
features required */
#if wxUSE_STACKWALKER
# undef wxUSE_STACKWALKER
# define wxUSE_STACKWALKER 0
#endif /* wxUSE_STACKWALKER */
#if wxUSE_ACCEL
# undef wxUSE_ACCEL
# define wxUSE_ACCEL 0
#endif /* wxUSE_ACCEL */
#if wxUSE_DYNLIB_CLASS
# undef wxUSE_DYNLIB_CLASS
# define wxUSE_DYNLIB_CLASS 0
#endif /* wxUSE_DYNLIB_CLASS */
#if wxUSE_DYNAMIC_LOADER
# undef wxUSE_DYNAMIC_LOADER
# define wxUSE_DYNAMIC_LOADER 0
#endif /* wxUSE_DYNAMIC_LOADER */
#if wxUSE_DATAOBJ
# undef wxUSE_DATAOBJ
# define wxUSE_DATAOBJ 0
#endif
#if wxUSE_CLIPBOARD
# undef wxUSE_CLIPBOARD
# define wxUSE_CLIPBOARD 0
#endif /* wxUSE_CLIPBOARD */
#if wxUSE_SOCKETS
# undef wxUSE_SOCKETS
# define wxUSE_SOCKETS 0
#endif /* wxUSE_SOCKETS */
#if wxUSE_THREADS
# undef wxUSE_THREADS
# define wxUSE_THREADS 0
#endif /* wxUSE_SOCKETS */
#if wxUSE_PROTOCOL
# undef wxUSE_PROTOCOL
# define wxUSE_PROTOCOL 0
#endif /* wxUSE_PROTOCOL */
#if wxUSE_URL
# undef wxUSE_URL
# define wxUSE_URL 0
#endif /* wxUSE_URL */
#if wxUSE_FS_INET
# undef wxUSE_FS_INET
# define wxUSE_FS_INET 0
#endif /* wxUSE_FS_INET */
#if wxUSE_MS_HTML_HELP
# undef wxUSE_MS_HTML_HELP
# define wxUSE_MS_HTML_HELP 0
#endif
#endif /* __WATCOM__ */
#endif /* _WX_MGL_CHKCONF_H_ */

View File

@@ -1,77 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/clipbrd.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_CLIPBOARD_H__
#define __WX_CLIPBOARD_H__
#if wxUSE_CLIPBOARD
#include "wx/object.h"
#include "wx/list.h"
#include "wx/dataobj.h"
#include "wx/control.h"
#include "wx/module.h"
// ----------------------------------------------------------------------------
// wxClipboard
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
{
public:
wxClipboard() {}
virtual ~wxClipboard() {}
// open the clipboard before SetData() and GetData()
virtual bool Open() {}
// close the clipboard after SetData() and GetData()
virtual void Close() {}
// query whether the clipboard is opened
virtual bool IsOpened() const {}
// set the clipboard data. all other formats will be deleted.
virtual bool SetData( wxDataObject *data ) {}
// add to the clipboard data.
virtual bool AddData( wxDataObject *data ) {}
// ask if data in correct format is available
virtual bool IsSupported( const wxDataFormat& format ) {}
// fill data with data on the clipboard (if available)
virtual bool GetData( wxDataObject& data ) {}
// clears wxTheClipboard and the system's clipboard if possible
virtual void Clear() {}
// implementation from now on
bool m_open;
bool m_ownsClipboard;
bool m_ownsPrimarySelection;
wxDataObject *m_data;
GtkWidget *m_clipboardWidget; /* for getting and offering data */
GtkWidget *m_targetsWidget; /* for getting list of supported formats */
bool m_waiting; /* querying data or formats is asynchronous */
bool m_formatSupported;
GdkAtom m_targetRequested;
wxDataObject *m_receivedData;
private:
DECLARE_DYNAMIC_CLASS(wxClipboard)
};
#endif
// wxUSE_CLIPBOARD
#endif
// __WX_CLIPBOARD_H__

View File

@@ -1,45 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/cursor.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_CURSOR_H__
#define __WX_CURSOR_H__
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
class MGLCursor;
//-----------------------------------------------------------------------------
// wxCursor
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
{
public:
wxCursor();
wxCursor(wxStockCursor id) { InitFromStock(id); }
#if WXWIN_COMPATIBILITY_2_8
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
#endif
wxCursor(const wxString& name,
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
int hotSpotX = 0, int hotSpotY = 0);
virtual ~wxCursor();
// implementation
MGLCursor *GetMGLCursor() const;
private:
void InitFromStock(wxStockCursor);
DECLARE_DYNAMIC_CLASS(wxCursor)
};
#endif // __WX_CURSOR_H__

View File

@@ -1,214 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/dc.h
// Purpose: wxDC class
// Author: Vaclav Slavik
// Created: 2001/03/09
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DC_H_
#define _WX_DC_H_
#include "wx/defs.h"
#include "wx/region.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxDC;
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
#ifndef MM_TEXT
#define MM_TEXT 0
#define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3
#define MM_HIMETRIC 4
#define MM_TWIPS 5
#define MM_POINTS 6
#define MM_METRIC 7
#endif
//-----------------------------------------------------------------------------
// wxDC
//-----------------------------------------------------------------------------
// MGL fwd declarations:
class MGLDevCtx;
class MGLRegion;
struct font_t;
class WXDLLIMPEXP_CORE wxDC : public wxDCBase
{
DECLARE_DYNAMIC_CLASS(wxDC)
public:
wxDC();
virtual ~wxDC();
// implement base class pure virtuals
// ----------------------------------
virtual void Clear();
virtual bool StartDoc(const wxString& message);
virtual void EndDoc();
virtual void StartPage();
virtual void EndPage();
virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen);
virtual void SetBrush(const wxBrush& brush);
virtual void SetBackground(const wxBrush& brush);
virtual void SetBackgroundMode(int mode);
virtual void SetPalette(const wxPalette& palette);
virtual void DestroyClippingRegion();
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
virtual void SetLogicalFunction(wxRasterOperationMode function);
// implementation from now on
// --------------------------
virtual void ComputeScaleAndOrigin();
wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
MGLDevCtx *GetMGLDC() const { return m_MGLDC; }
void SetMGLDC(MGLDevCtx *mgldc, bool OwnsMGLDC = false);
protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
wxFloodFillStyle style = wxFLOOD_SURFACE);
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
virtual void DoDrawPoint(wxCoord x, wxCoord y);
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc);
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea);
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord width, wxCoord height,
double radius);
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoCrossHair(wxCoord x, wxCoord y);
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = false);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle);
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
virtual void DoSetDeviceClippingRegion(const wxRegion& region);
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetSizeMM(int* width, int* height) const;
virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
// implementation from now on:
protected:
// setup newly attached MGLDevCtx for wxDC's use
// (does things like setting RGB blending mode for antialiased texts):
void InitializeMGLDC();
// common part of DoDrawText() and DoDrawRotatedText()
void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);
// MGL uses pens as both wxPens and wxBrushes, so we have to
// switch them as needed:
void SelectPen();
void SelectBrush();
void SelectMGLStipplePen(int style);
void SelectMGLFatPen(int style, int flag);
// Select m_font into m_MGLDC:
bool SelectMGLFont();
// Convert wxWin logical function to MGL rop:
int LogicalFunctionToMGLRop(int logFunc) const;
// Unified implementation of DrawIcon, DrawBitmap and Blit:
void DoDrawSubBitmap(const wxBitmap &bmp,
wxCoord x, wxCoord y, wxCoord w, wxCoord h,
wxCoord destx, wxCoord desty, int rop, bool useMask);
// MGL DC class we use:
MGLDevCtx *m_MGLDC;
bool m_OwnsMGLDC:1;
// helper variables for SelectXXXX():
bool m_penSelected;
bool m_brushSelected;
bool m_downloadedPatterns[2];
// MGL does not render lines with width>1 with endings centered
// at given coords but with top left corner of the pen at them,
// these offsets are used to correct it. They are computed by
// SelectPen.
int m_penOfsX, m_penOfsY;
double m_mm_to_pix_x, m_mm_to_pix_y;
wxPalette m_oldPalette;
wxRegion m_currentClippingRegion;
wxRegion m_globalClippingRegion;
// wxDC::Blit handles memoryDCs as special cases :(
bool m_isMemDC;
font_t *m_mglFont;
};
#endif
// _WX_DC_H_

View File

@@ -1,71 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/dcclient.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_DCCLIENT_H__
#define __WX_DCCLIENT_H__
#include "wx/dc.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxWindowDC;
class WXDLLIMPEXP_FWD_CORE wxPaintDC;
class WXDLLIMPEXP_FWD_CORE wxClientDC;
class WXDLLIMPEXP_FWD_CORE wxWindowMGL;
//-----------------------------------------------------------------------------
// wxWindowDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
{
public:
wxWindowDC() {}
virtual ~wxWindowDC();
wxWindowDC(wxWindow *win);
protected:
wxWindow *m_wnd;
bool m_inPaintHandler;
private:
DECLARE_DYNAMIC_CLASS(wxWindowDC)
};
//-----------------------------------------------------------------------------
// wxClientDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
{
public:
wxClientDC() : wxWindowDC() {}
wxClientDC(wxWindow *win);
private:
DECLARE_DYNAMIC_CLASS(wxClientDC)
};
//-----------------------------------------------------------------------------
// wxPaintDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
{
public:
wxPaintDC() : wxClientDC() {}
wxPaintDC(wxWindow *win) : wxClientDC(win) {}
private:
DECLARE_DYNAMIC_CLASS(wxPaintDC)
};
#endif // __WX_DCCLIENT_H__

View File

@@ -1,59 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/dcmemory.h
// Purpose:
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_DCMEMORY_H__
#define __WX_DCMEMORY_H__
#include "wx/defs.h"
#include "wx/dcclient.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
//-----------------------------------------------------------------------------
// wxMemoryDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC, public wxMemoryDCBase
{
public:
wxMemoryDC() { Init(); }
wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
wxMemoryDC(wxDC *dc); // Create compatible DC
virtual ~wxMemoryDC();
// these get reimplemented for mono-bitmaps to behave
// more like their Win32 couterparts. They now interpret
// wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
// and everything else as drawing 1.
virtual void SetPen(const wxPen &pen);
virtual void SetBrush(const wxBrush &brush);
virtual void SetTextForeground(const wxColour &col);
virtual void SetTextBackground(const wxColour &col);
// implementation
wxBitmap m_selected;
wxBitmap GetSelectedObject() const { return m_selected; }
protected:
virtual void DoSelect(const wxBitmap& bitmap);
private:
void Init();
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
};
#endif
// __WX_DCMEMORY_H__

View File

@@ -1,42 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/dcscreen.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_DCSCREEN_H__
#define __WX_DCSCREEN_H__
#include "wx/dcclient.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxScreenDC;
//-----------------------------------------------------------------------------
// wxScreenDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxScreenDC: public wxDC
{
public:
wxScreenDC();
virtual ~wxScreenDC();
static bool StartDrawingOnTop(wxWindow *WXUNUSED(window)) { return TRUE; }
static bool StartDrawingOnTop(wxRect *WXUNUSED(rect) = NULL) { return TRUE; }
static bool EndDrawingOnTop() { return TRUE; }
private:
DECLARE_DYNAMIC_CLASS(wxScreenDC)
};
#endif
// __WX_DCSCREEN_H__

View File

@@ -1,121 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/font.h
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_FONT_H__
#define __WX_FONT_H__
#include "wx/hash.h"
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxPaintDC;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxFont;
struct font_t;
// ----------------------------------------------------------------------------
// wxFont
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
{
public:
// ctors and such
wxFont() { }
wxFont(const wxNativeFontInfo& info)
{
(void)Create(info);
}
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxFont(int size,
int family,
int style,
int weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
(void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
}
#endif
wxFont(int size,
wxFontFamily family,
wxFontStyle style,
wxFontWeight weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Create(size, family, style, weight, underlined, face, encoding);
}
wxFont(const wxSize& pixelSize,
wxFontFamily family,
wxFontStyle style,
wxFontWeight weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Create(10, family, style, weight, underlined, face, encoding);
SetPixelSize(pixelSize);
}
bool Create(int size,
wxFontFamily family,
wxFontStyle style,
wxFontWeight weight,
bool underlined = false,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
bool Create(const wxNativeFontInfo& fontinfo);
virtual ~wxFont() {}
// implement base class pure virtuals
virtual int GetPointSize() const;
virtual wxFontStyle GetStyle() const;
virtual wxFontWeight GetWeight() const;
virtual wxString GetFaceName() const;
virtual bool GetUnderlined() const;
virtual wxFontEncoding GetEncoding() const;
virtual bool IsFixedWidth() const;
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
virtual void SetPointSize(int pointSize);
virtual void SetFamily(wxFontFamily family);
virtual void SetStyle(wxFontStyle style);
virtual void SetWeight(wxFontWeight weight);
virtual bool SetFaceName(const wxString& faceName);
virtual void SetUnderlined(bool underlined);
virtual void SetEncoding(wxFontEncoding encoding);
wxDECLARE_COMMON_FONT_METHODS();
struct font_t *GetMGLfont_t(float scale, bool antialiased);
protected:
// ref counting code
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
virtual wxFontFamily DoGetFamily() const;
private:
DECLARE_DYNAMIC_CLASS(wxFont)
};
#endif // __WX_FONT_H__

View File

@@ -1,49 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/palette.h
// Purpose:
// Author: Vaclav Slavik
// Created: 2001/03/11
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_PALETTE_H__
#define __WX_PALETTE_H__
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxPalette;
struct palette_t;
//-----------------------------------------------------------------------------
// wxPalette
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
{
public:
wxPalette();
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
virtual ~wxPalette();
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
// implementation
virtual int GetColoursCount() const;
palette_t *GetMGLpalette_t() const;
DECLARE_DYNAMIC_CLASS(wxPalette)
};
#endif // __WX_PALETTE_H__

View File

@@ -1,79 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/pen.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_PEN_H__
#define __WX_PEN_H__
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxPen;
//-----------------------------------------------------------------------------
// wxPen
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPen : public wxPenBase
{
public:
wxPen() {}
wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
#endif
wxPen(const wxBitmap& stipple, int width);
virtual ~wxPen() {}
bool operator == (const wxPen& pen) const;
bool operator != (const wxPen& pen) const;
void SetColour(const wxColour &colour);
void SetColour(unsigned char red, unsigned char green, unsigned char blue);
void SetCap(wxPenCap capStyle);
void SetJoin(wxPenJoin joinStyle);
void SetStyle(wxPenStyle style);
void SetWidth(int width);
void SetDashes(int number_of_dashes, const wxDash *dash);
void SetStipple(const wxBitmap& stipple);
wxColour GetColour() const;
wxPenCap GetCap() const;
wxPenJoin GetJoin() const;
wxPenStyle GetStyle() const;
int GetWidth() const;
int GetDashes(wxDash **ptr) const;
int GetDashCount() const;
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
#if FUTURE_WXWIN_COMPATIBILITY_3_0
wxDEPRECATED_FUTURE( void SetStyle(int style) )
{ SetStyle((wxPenStyle)style); }
#endif
// implementation:
void* GetPixPattern() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
private:
DECLARE_DYNAMIC_CLASS(wxPen)
};
#endif // __WX_PEN_H__

View File

@@ -1,39 +0,0 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/popupwin.h
// Purpose: wxPopupWindow class for wxMGL
// Author: Vadim Zeitlin
// Created: 06.01.01
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_POPUPWIN_H_
#define _WX_POPUPWIN_H_
// ----------------------------------------------------------------------------
// wxPopupWindow
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase
{
public:
wxPopupWindow() { }
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
bool Create(wxWindow *parent, int flags = wxBORDER_NONE)
{
return wxPopupWindowBase::Create(parent) &&
wxWindow::Create(parent, -1,
wxDefaultPosition, wxDefaultSize,
(flags & wxBORDER_MASK) | wxPOPUP_WINDOW);
}
protected:
DECLARE_DYNAMIC_CLASS(wxPopupWindow)
};
#endif // _WX_POPUPWIN_H_

View File

@@ -1,58 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/private.h
// Purpose: Private declarations: as this header is only included by
// wxWidgets itself, it may contain identifiers which don't start
// with "wx".
// Author: Vaclav Slavik
// Created: 2001/04/07
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MGL_PRIVATE_H_
#define _WX_MGL_PRIVATE_H_
#include "wx/ioswrap.h"
#include <mgraph.hpp>
#include "pmapi.h"
// the scitech headers define true and false
#undef true
#undef false
class WXDLLIMPEXP_FWD_CORE wxBitmap;
// ---------------------------------------------------------------------------
// private variables
// ---------------------------------------------------------------------------
extern MGLDevCtx *g_displayDC;
extern winmng_t *g_winMng;
// ---------------------------------------------------------------------------
// helper functions
// ---------------------------------------------------------------------------
// This function converts wxBitmap into pixpattern24_t representation
// (used by wxBrush and wxPen)
extern void wxBitmapToPixPattern(const wxBitmap& bitmap,
pixpattern24_t *pix, pattern_t *mask);
// Sets current DC and restores previous one upon destruction:
class wxCurrentDCSwitcher
{
public:
wxCurrentDCSwitcher(MGLDevCtx *dc)
{ m_old = dc->makeCurrent(); }
~wxCurrentDCSwitcher()
{ MGL_makeCurrentDC(m_old); }
MGLDC *m_old;
};
#endif // _WX_MGL_PRIVATE_H_

View File

@@ -1,75 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/private/fontmgr.h
// Purpose: font management for MGL
// Author: Vaclav Slavik
// Created: 2006-11-18
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MGL_PRIVATE_FONTMGR_H_
#define _WX_MGL_PRIVATE_FONTMGR_H_
struct font_info_t;
struct font_lib_t;
struct font_t;
class wxFontInstance : public wxFontInstanceBase
{
public:
wxFontInstance(float ptSize, bool aa, font_lib_t *fontLib);
virtual ~wxFontInstance();
struct font_t *GetMGLfont_t() const { return m_font; }
private:
font_t *m_font;
};
class wxFontFace : public wxFontFaceBase
{
public:
wxFontFace(const wxString& filename)
: m_fontLib(NULL), m_fileName(filename) {}
virtual void Acquire();
virtual void Release();
virtual wxFontInstance *GetFontInstance(float ptSize, bool aa);
protected:
wxFontInstance *CreateFontInstance(float ptSize, bool aa);
private:
font_lib_t *m_fontLib;
wxString m_fileName;
};
class wxFontBundle : public wxFontBundleBase
{
public:
wxFontBundle(const font_info_t *fontInfo);
virtual wxString GetName() const;
virtual bool IsFixed() const;
const font_info_t *GetInfo() const { return m_fontInfo; }
private:
const font_info_t *m_fontInfo;
};
class wxFontsManager : public wxFontsManagerBase
{
public:
wxFontsManager() { AddAllFonts(); }
virtual wxString GetDefaultFacename(wxFontFamily family) const;
private:
// adds all fonts using AddBundle()
void AddAllFonts();
};
#endif // _WX_MGL_PRIVATE_FONTMGR_H_

View File

@@ -1,103 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/region.h
// Purpose: wxRegion class
// Author: Vaclav Slavik
// Created: 2001/03/12
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MGL_REGION_H_
#define _WX_MGL_REGION_H_
#include "wx/list.h"
class MGLRegion;
class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase
{
public:
wxRegion();
wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
wxRegion(const wxRect& rect);
wxRegion(const MGLRegion& region);
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
wxRegion(const wxBitmap& bmp)
{
Union(bmp);
}
wxRegion(const wxBitmap& bmp,
const wxColour& transColour, int tolerance = 0)
{
Union(bmp, transColour, tolerance);
}
virtual ~wxRegion();
// wxRegionBase methods
virtual void Clear();
virtual bool IsEmpty() const;
// implementation from now on:
const MGLRegion& GetMGLRegion() const;
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
// wxRegionBase pure virtuals
virtual bool DoIsEqual(const wxRegion& region) const;
virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const;
virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const;
virtual wxRegionContain DoContainsRect(const wxRect& rect) const;
virtual bool DoOffset(wxCoord x, wxCoord y);
virtual bool DoUnionWithRect(const wxRect& rect);
virtual bool DoUnionWithRegion(const wxRegion& region);
virtual bool DoIntersect(const wxRegion& region);
virtual bool DoSubtract(const wxRegion& region);
virtual bool DoXor(const wxRegion& region);
private:
DECLARE_DYNAMIC_CLASS(wxRegion);
friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator;
};
WX_DECLARE_EXPORTED_LIST(wxRect, wxRegionRectList);
class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject
{
public:
wxRegionIterator(void);
wxRegionIterator(const wxRegion& region);
virtual ~wxRegionIterator(void);
void Reset(void) { m_currentNode = NULL; }
void Reset(const wxRegion& region);
operator bool (void) const { return (m_currentNode != NULL); }
bool HaveRects(void) const { return (m_currentNode != NULL); }
void operator ++ (void);
void operator ++ (int);
wxCoord GetX(void) const;
wxCoord GetY(void) const;
wxCoord GetW(void) const;
wxCoord GetWidth(void) const { return GetW(); }
wxCoord GetH(void) const;
wxCoord GetHeight(void) const { return GetH(); }
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
private:
wxRegionRectList m_rects;
wxRegionRectList::Node *m_currentNode;
DECLARE_DYNAMIC_CLASS(wxRegionIterator);
};
#endif // _WX_MGL_REGION_H_

View File

@@ -1,81 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/toplevel.h
// Purpose: Top level window, abstraction of wxFrame and wxDialog
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_TOPLEVEL_H__
#define __WX_TOPLEVEL_H__
//-----------------------------------------------------------------------------
// wxTopLevelWindowMGL
//-----------------------------------------------------------------------------
class wxTopLevelWindowMGL : public wxTopLevelWindowBase
{
public:
// construction
wxTopLevelWindowMGL() { Init(); }
wxTopLevelWindowMGL(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Init();
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
// implement base class pure virtuals
virtual void Maximize(bool maximize = true);
virtual bool IsMaximized() const;
virtual void Iconize(bool iconize = true);
virtual bool IsIconized() const;
virtual void Restore();
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual bool IsFullScreen() const { return m_fsIsShowing; }
virtual bool Show(bool show = true);
virtual void SetTitle(const wxString &title) { m_title = title; }
virtual wxString GetTitle() const { return m_title; }
// implementation from now on
// --------------------------
protected:
// common part of all ctors
void Init();
wxString m_title;
bool m_fsIsShowing:1; /* full screen */
long m_fsSaveStyle;
long m_fsSaveFlag;
wxRect m_fsSaveFrame;
// is the frame currently iconized?
bool m_isIconized:1;
// and maximized?
bool m_isMaximized:1;
wxRect m_savedFrame;
// did we sent wxSizeEvent at least once?
bool m_sizeSet:1;
};
#endif // __WX_TOPLEVEL_H__

View File

@@ -1,149 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mgl/window.h
// Purpose: wxWindow class
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WINDOW_H_
#define _WX_WINDOW_H_
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
#include "wx/font.h"
struct window_t;
class MGLDevCtx;
// ---------------------------------------------------------------------------
// wxWindow declaration for MGL
// ---------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxWindowMGL : public wxWindowBase
{
public:
wxWindowMGL() { Init(); }
wxWindowMGL(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
}
virtual ~wxWindowMGL();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
// implement base class (pure) virtual methods
// -------------------------------------------
virtual void SetLabel( const wxString &WXUNUSED(label) ) {}
virtual wxString GetLabel() const { return wxEmptyString; }
virtual void Raise();
virtual void Lower();
virtual bool Show(bool show = true);
virtual void SetFocus();
virtual bool Reparent(wxWindowBase *newParent);
virtual void WarpPointer(int x, int y);
virtual void Refresh(bool eraseBackground = true,
const wxRect *rect = (const wxRect *) NULL);
virtual void Update();
virtual bool SetCursor(const wxCursor &cursor);
virtual bool SetFont(const wxFont &font) { m_font = font; return true; }
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget(wxDropTarget *dropTarget);
#endif // wxUSE_DRAG_AND_DROP
// Accept files for dragging
virtual void DragAcceptFiles(bool accept);
virtual WXWidget GetHandle() const { return m_wnd; }
void SetMGLwindow_t(struct window_t *wnd);
// implementation from now on
// --------------------------
protected:
virtual void DoFreeze();
virtual void DoThaw();
// the window handle
struct window_t *m_wnd;
// whether there should be wxEraseEvent before wxPaintEvent or not
// (see wxWindow::Refresh)
bool m_refreshAfterThaw:1;
int m_eraseBackground;
// implement the base class pure virtuals
virtual void DoGetTextExtent(const wxString& string,
int *x, int *y,
int *descent = NULL,
int *externalLeading = NULL,
const wxFont *font = NULL) const;
virtual void DoClientToScreen( int *x, int *y ) const;
virtual void DoScreenToClient( int *x, int *y ) const;
virtual void DoGetPosition( int *x, int *y ) const;
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetClientSize( int *width, int *height ) const;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoCaptureMouse();
virtual void DoReleaseMouse();
// move the window to the specified location and resize it: this is called
// from both DoSetSize() and DoSetClientSize() and would usually just call
// ::MoveWindow() except for composite controls which will want to arrange
// themselves inside the given rectangle
virtual void DoMoveWindow(int x, int y, int width, int height);
private:
// common part of all ctors
void Init();
// counterpart to SetFocus
void KillFocus();
MGLDevCtx *m_paintMGLDC;
friend class wxPaintDC;
DECLARE_DYNAMIC_CLASS(wxWindowMGL)
wxDECLARE_NO_COPY_CLASS(wxWindowMGL);
DECLARE_EVENT_TABLE()
public:
void HandlePaint(MGLDevCtx *dc);
// needed by wxWindowPainter
MGLDevCtx *GetPaintMGLDC() const { return m_paintMGLDC; }
};
#endif // _WX_WINDOW_H_

View File

@@ -34,8 +34,6 @@ public:
#include "wx/x11/palette.h"
#elif defined(__WXGTK__) || defined(__WXCOCOA__)
#include "wx/generic/paletteg.h"
#elif defined(__WXMGL__)
#include "wx/mgl/palette.h"
#elif defined(__WXMAC__)
#include "wx/osx/palette.h"
#elif defined(__WXPM__)

View File

@@ -107,8 +107,6 @@ public:
#include "wx/gtk/pen.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/pen.h"
#elif defined(__WXMGL__)
#include "wx/mgl/pen.h"
#elif defined(__WXDFB__)
#include "wx/dfb/pen.h"
#elif defined(__WXMAC__)

View File

@@ -72,15 +72,14 @@ enum wxPortId
wxPORT_MSW = 1 << 1, // wxMSW, native toolkit is Windows API
wxPORT_MOTIF = 1 << 2, // wxMotif, using [Open]Motif or Lesstif
wxPORT_GTK = 1 << 3, // wxGTK, using GTK+ 1.x, 2.x, GPE or Maemo
wxPORT_MGL = 1 << 4, // wxMGL, using wxUniversal
wxPORT_DFB = 1 << 4, // wxDFB, using wxUniversal
wxPORT_X11 = 1 << 5, // wxX11, using wxUniversal
wxPORT_PM = 1 << 6, // wxOS2, using OS/2 Presentation Manager
wxPORT_OS2 = wxPORT_PM, // wxOS2, using OS/2 Presentation Manager
wxPORT_MAC = 1 << 7, // wxOSX (former wxMac), using Cocoa, Carbon or iPhone API
wxPORT_OSX = wxPORT_MAC, // wxOSX, using Cocoa, Carbon or iPhone API
wxPORT_COCOA = 1 << 8, // wxCocoa, using Cocoa NextStep/Mac API
wxPORT_WINCE = 1 << 9, // wxWinCE, toolkit is WinCE SDK API
wxPORT_DFB = 1 << 10 // wxDFB, using wxUniversal
wxPORT_WINCE = 1 << 9 // wxWinCE, toolkit is WinCE SDK API
};
// architecture of the operating system
@@ -362,7 +361,6 @@ protected:
#define wxWIN32S wxOS_WINDOWS_9X
#define wxOS2 wxPORT_OS2
#define wxMGL wxPORT_MGL
#define wxCocoa wxPORT_MAC
#define wxMac wxPORT_MAC
#define wxMotif wxPORT_MOTIF

View File

@@ -66,8 +66,6 @@ public:
#include "wx/motif/popupwin.h"
#elif defined(__WXDFB__)
#include "wx/dfb/popupwin.h"
#elif defined(__WXMGL__)
#include "wx/mgl/popupwin.h"
#elif defined(__WXMAC__)
#include "wx/osx/popupwin.h"
#else

View File

@@ -192,9 +192,7 @@ protected:
#if defined(__WXMGL__)
#include "wx/mgl/private/fontmgr.h"
#elif defined(__WXDFB__)
#if defined(__WXDFB__)
#include "wx/dfb/private/fontmgr.h"
#endif

View File

@@ -220,8 +220,6 @@ protected:
#include "wx/gtk1/region.h"
#elif defined(__WXMOTIF__) || defined(__WXX11__)
#include "wx/x11/region.h"
#elif defined(__WXMGL__)
#include "wx/mgl/region.h"
#elif defined(__WXDFB__)
#include "wx/dfb/region.h"
#elif defined(__WXMAC__)

View File

@@ -367,9 +367,6 @@ protected:
#elif defined(__WXX11__)
#include "wx/x11/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowX11
#elif defined(__WXMGL__)
#include "wx/mgl/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowMGL
#elif defined(__WXDFB__)
#include "wx/dfb/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowDFB

View File

@@ -44,8 +44,6 @@ class WXDLLIMPEXP_FWD_CORE wxRenderer;
#define wxWindowNative wxWindowMSW
#elif defined(__WXGTK__)
#define wxWindowNative wxWindowGTK
#elif defined(__WXMGL__)
#define wxWindowNative wxWindowMGL
#elif defined(__WXX11__)
#define wxWindowNative wxWindowX11
#elif defined(__WXMAC__)

View File

@@ -1842,9 +1842,6 @@ inline void wxWindowBase::SetInitialBestSize(const wxSize& size)
#define wxWindowX11 wxWindow
#endif // wxUniv
#include "wx/x11/window.h"
#elif defined(__WXMGL__)
#define wxWindowNative wxWindowMGL
#include "wx/mgl/window.h"
#elif defined(__WXDFB__)
#define wxWindowNative wxWindowDFB
#include "wx/dfb/window.h"

View File

@@ -54,11 +54,6 @@
# include "wx/os2/private.h"
#endif
// include mgl headers
#ifdef __WXMGL__
# include "wx/mgl/private.h"
#endif
// include the most common wx headers
#include "wx/wx.h"