PalmOS 6 compilation fixes (patch 1849757)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,13 +19,17 @@
|
||||
class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
|
||||
{
|
||||
public:
|
||||
#if wxUSE_CONSOLE_EVENTLOOP
|
||||
virtual wxEventLoopBase *CreateEventLoop();
|
||||
#endif // wxUSE_CONSOLE_EVENTLOOP
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AlwaysYield();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
#if wxUSE_TIMER
|
||||
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) { return NULL; };
|
||||
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) { return new wxPalmOSTimerImpl(timer); }
|
||||
#endif
|
||||
virtual bool DoMessageFromThreadWait();
|
||||
virtual WXDWORD WaitForThread(WXHANDLE hThread);
|
||||
};
|
||||
|
||||
#if wxUSE_GUI
|
||||
@@ -33,6 +37,7 @@ public:
|
||||
class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
|
||||
{
|
||||
public:
|
||||
virtual wxEventLoopBase *CreateEventLoop();
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AlwaysYield();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
|
@@ -150,6 +150,9 @@
|
||||
#undef wxUSE_ICO_CUR
|
||||
#define wxUSE_ICO_CUR 0
|
||||
|
||||
#undef wxUSE_SVG
|
||||
#define wxUSE_SVG 0
|
||||
|
||||
#undef wxUSE_INTL
|
||||
#define wxUSE_INTL 0
|
||||
|
||||
@@ -303,8 +306,8 @@
|
||||
#undef wxUSE_URL
|
||||
#define wxUSE_URL 0
|
||||
|
||||
#undef wxUSE_WCHAR_T
|
||||
#define wxUSE_WCHAR_T 0
|
||||
//#undef wxUSE_WCHAR_T
|
||||
//#define wxUSE_WCHAR_T 1
|
||||
|
||||
#undef wxUSE_WIZARDDLG
|
||||
#define wxUSE_WIZARDDLG 0
|
||||
@@ -324,5 +327,11 @@
|
||||
#undef wxUSE_ZLIB
|
||||
#define wxUSE_ZLIB 0
|
||||
|
||||
#undef wxUSE_COLLPANE
|
||||
#define wxUSE_COLLPANE 0
|
||||
|
||||
#undef wxUSE_TOOLBOOK
|
||||
#define wxUSE_TOOLBOOK 0
|
||||
|
||||
#endif
|
||||
/* _WX_PALMOS_CHKCONF_H_ */
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
virtual bool IsShown() const;
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel();
|
||||
//virtual wxString GetLabel();
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
@@ -9,8 +9,8 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DC_H_
|
||||
#define _WX_DC_H_
|
||||
#ifndef _WX_PALM_DC_H_
|
||||
#define _WX_PALM_DC_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dc.h"
|
||||
@@ -41,11 +41,13 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxDC : public wxDCBase
|
||||
// this is an ABC: use one of the derived classes to create a DC associated
|
||||
// with a window, screen, printer and so on
|
||||
class WXDLLEXPORT wxPalmDCImpl: public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxDC();
|
||||
virtual ~wxDC();
|
||||
wxPalmDCImpl(wxDC *owner, WXHDC hDC);
|
||||
virtual ~wxPalmDCImpl();
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
@@ -71,46 +73,31 @@ public:
|
||||
|
||||
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 DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
|
||||
|
||||
virtual bool CanDrawBitmap() const;
|
||||
virtual bool CanGetTextExtent() const;
|
||||
virtual int GetDepth() const;
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
|
||||
virtual void SetMapMode(int mode);
|
||||
virtual void SetUserScale(double x, double y);
|
||||
virtual void SetSystemScale(double x, double y);
|
||||
virtual void SetLogicalScale(double x, double y);
|
||||
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
|
||||
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
|
||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
||||
|
||||
virtual void SetLogicalFunction(int function);
|
||||
|
||||
virtual wxCoord DeviceToLogicalX(wxCoord x) const;
|
||||
virtual wxCoord DeviceToLogicalY(wxCoord y) const;
|
||||
virtual wxCoord DeviceToLogicalXRel(wxCoord x) const;
|
||||
virtual wxCoord DeviceToLogicalYRel(wxCoord y) const;
|
||||
virtual wxCoord LogicalToDeviceX(wxCoord x) const;
|
||||
virtual wxCoord LogicalToDeviceY(wxCoord y) const;
|
||||
virtual wxCoord LogicalToDeviceXRel(wxCoord x) const;
|
||||
virtual wxCoord LogicalToDeviceYRel(wxCoord y) const ;
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual void SetRop(WXHDC cdc);
|
||||
virtual void SelectOldObjects(WXHDC dc);
|
||||
|
||||
wxWindow *GetWindow() const { return m_canvas; }
|
||||
void SetWindow(wxWindow *win)
|
||||
{
|
||||
m_canvas = win;
|
||||
m_window = win;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// if we have palettes use the correct one for this window
|
||||
@@ -119,7 +106,7 @@ public:
|
||||
}
|
||||
|
||||
WXHDC GetHDC() const { return m_hDC; }
|
||||
void SetHDC(WXHDC dc, bool bOwnsDC = FALSE)
|
||||
void SetHDC(WXHDC dc, bool bOwnsDC = false)
|
||||
{
|
||||
m_hDC = dc;
|
||||
m_bOwnsDC = bOwnsDC;
|
||||
@@ -147,10 +134,52 @@ public:
|
||||
static void ClearCache();
|
||||
#endif
|
||||
|
||||
// RTL related functions
|
||||
// ---------------------
|
||||
|
||||
// get or change the layout direction (LTR or RTL) for this dc,
|
||||
// wxLayout_Default is returned if layout direction is not supported
|
||||
virtual wxLayoutDirection GetLayoutDirection() const;
|
||||
virtual void SetLayoutDirection(wxLayoutDirection dir);
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
m_bOwnsDC = false;
|
||||
m_hDC = NULL;
|
||||
|
||||
m_oldBitmap = NULL;
|
||||
m_oldPen = NULL;
|
||||
m_oldBrush = NULL;
|
||||
m_oldFont = NULL;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
m_oldPalette = NULL;
|
||||
#endif // wxUSE_PALETTE
|
||||
}
|
||||
|
||||
// create an uninitialized DC: this should be only used by the derived
|
||||
// classes
|
||||
wxPalmDCImpl( wxDC *owner ) : wxDCImpl( owner ) { Init(); }
|
||||
|
||||
void RealizeScaleAndOrigin();
|
||||
|
||||
public:
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL) const;
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
|
||||
|
||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
int style = wxFLOOD_SURFACE);
|
||||
|
||||
virtual void DoGradientFillLinear(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour,
|
||||
wxDirection nDirection = wxEAST);
|
||||
|
||||
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
|
||||
|
||||
virtual void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
@@ -170,11 +199,15 @@ protected:
|
||||
double radius);
|
||||
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
||||
#if wxUSE_SPLINES
|
||||
virtual void DoDrawSpline(const wxPointList *points);
|
||||
#endif
|
||||
|
||||
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);
|
||||
bool useMask = false);
|
||||
|
||||
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
|
||||
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
|
||||
@@ -182,7 +215,15 @@ protected:
|
||||
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
|
||||
virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord dstWidth, wxCoord dstHeight,
|
||||
wxDC *source,
|
||||
wxCoord xsrc, wxCoord ysrc,
|
||||
wxCoord srcWidth, wxCoord srcHeight,
|
||||
int rop = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
|
||||
// this is gnarly - we can't even call this function DoSetClippingRegion()
|
||||
// because of virtual function hiding
|
||||
@@ -192,7 +233,6 @@ protected:
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const;
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
virtual void DoDrawLines(int n, wxPoint points[],
|
||||
@@ -203,6 +243,11 @@ protected:
|
||||
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
int fillStyle = wxODDEVEN_RULE);
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
||||
{
|
||||
return subrect == NULL ? GetSelectedBitmap()
|
||||
: GetSelectedBitmap().GetSubBitmap(*subrect);
|
||||
}
|
||||
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
@@ -210,18 +255,30 @@ protected:
|
||||
// (tell windows to translate pixel from other palettes to our custom one
|
||||
// and vice versa)
|
||||
// Realize tells it to also reset the system palette to this one.
|
||||
void DoSelectPalette(bool realize = FALSE);
|
||||
void DoSelectPalette(bool realize = false);
|
||||
|
||||
// Find out what palette our parent window has, then select it into the dc
|
||||
void InitializePalette();
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
protected:
|
||||
// common part of DoDrawText() and DoDrawRotatedText()
|
||||
void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);
|
||||
|
||||
// common part of DoSetClippingRegion() and DoSetClippingRegionAsRegion()
|
||||
void SetClippingHrgn(WXHRGN hrgn);
|
||||
|
||||
// implementation of DoGetSize() for wxScreen/PrinterDC: this simply
|
||||
// returns the size of the entire device this DC is associated with
|
||||
//
|
||||
// notice that we intentionally put it in a separate function instead of
|
||||
// DoGetSize() itself because we want it to remain pure virtual both
|
||||
// because each derived class should take care to define it as needed (this
|
||||
// implementation is not at all always appropriate) and because we want
|
||||
// wxDC to be an ABC to prevent it from being created directly
|
||||
void GetDeviceSize(int *width, int *height) const;
|
||||
|
||||
|
||||
// MSW-specific member variables
|
||||
// -----------------------------
|
||||
|
||||
@@ -249,12 +306,12 @@ protected:
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
#if wxUSE_DC_CACHEING
|
||||
static wxList sm_bitmapCache;
|
||||
static wxList sm_dcCache;
|
||||
static wxObjectList sm_bitmapCache;
|
||||
static wxObjectList sm_dcCache;
|
||||
#endif
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDC)
|
||||
DECLARE_NO_COPY_CLASS(wxDC)
|
||||
DECLARE_CLASS(wxPalmDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxPalmDCImpl)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -262,15 +319,50 @@ protected:
|
||||
// only/mainly)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxDCTempImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// construct a temporary DC with the specified HDC and size (it should be
|
||||
// specified whenever we know it for this HDC)
|
||||
wxDCTempImpl(wxDC *owner, WXHDC hdc, const wxSize& size )
|
||||
: wxPalmDCImpl( owner, hdc ),
|
||||
m_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~wxDCTempImpl()
|
||||
{
|
||||
// prevent base class dtor from freeing it
|
||||
SetHDC((WXHDC)NULL);
|
||||
}
|
||||
|
||||
virtual void DoGetSize(int *w, int *h) const
|
||||
{
|
||||
wxASSERT_MSG( m_size.IsFullySpecified(),
|
||||
_T("size of this DC hadn't been set and is unknown") );
|
||||
|
||||
if ( w )
|
||||
*w = m_size.x;
|
||||
if ( h )
|
||||
*h = m_size.y;
|
||||
}
|
||||
|
||||
private:
|
||||
// size of this DC must be explicitly set by SetSize() as we have no way to
|
||||
// find it ourselves
|
||||
const wxSize m_size;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxDCTempImpl)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxDCTemp : public wxDC
|
||||
{
|
||||
public:
|
||||
wxDCTemp(WXHDC hdc) { SetHDC(hdc); }
|
||||
virtual ~wxDCTemp() { SetHDC((WXHDC)NULL); }
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxDCTemp)
|
||||
wxDCTemp(WXHDC hdc, const wxSize& size = wxDefaultSize)
|
||||
: wxDC(new wxDCTempImpl(this, hdc, size))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DC_H_
|
||||
// _WX_PALM_DC_H_
|
||||
|
@@ -17,6 +17,8 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -32,56 +34,54 @@ WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
||||
// DC classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxWindowDC : public wxDC
|
||||
class WXDLLEXPORT wxWindowDCImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxWindowDC();
|
||||
wxWindowDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding to the whole window
|
||||
wxWindowDC(wxWindow *win);
|
||||
wxWindowDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
protected:
|
||||
// initialize the newly created DC
|
||||
void InitDC();
|
||||
|
||||
// override some base class virtuals
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC)
|
||||
DECLARE_CLASS(wxWindowDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxWindowDCImpl)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxClientDC : public wxWindowDC
|
||||
class WXDLLEXPORT wxClientDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxClientDC();
|
||||
wxClientDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding to the client area of the window
|
||||
wxClientDC(wxWindow *win);
|
||||
wxClientDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual ~wxClientDC();
|
||||
virtual ~wxClientDCImpl();
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
protected:
|
||||
void InitDC();
|
||||
|
||||
// override some base class virtuals
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC)
|
||||
DECLARE_CLASS(wxClientDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxClientDCImpl)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxPaintDC : public wxClientDC
|
||||
class WXDLLEXPORT wxPaintDCImpl : public wxClientDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDC();
|
||||
wxPaintDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding for painting the window in OnPaint()
|
||||
wxPaintDC(wxWindow *win);
|
||||
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual ~wxPaintDC();
|
||||
virtual ~wxPaintDCImpl();
|
||||
|
||||
// find the entry for this DC in the cache (keyed by the window)
|
||||
static WXHDC FindDCInCache(wxWindow* win);
|
||||
@@ -92,26 +92,8 @@ protected:
|
||||
// find the entry for this DC in the cache (keyed by the window)
|
||||
wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC)
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPaintDCEx
|
||||
* This class is used when an application sends an HDC with the WM_PAINT
|
||||
* message. It is used in HandlePaint and need not be used by an application.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPaintDCEx : public wxPaintDC
|
||||
{
|
||||
public:
|
||||
wxPaintDCEx(wxWindow *canvas, WXHDC dc);
|
||||
virtual ~wxPaintDCEx();
|
||||
private:
|
||||
int saveState;
|
||||
|
||||
DECLARE_CLASS(wxPaintDCEx)
|
||||
DECLARE_NO_COPY_CLASS(wxPaintDCEx)
|
||||
DECLARE_CLASS(wxPaintDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxPaintDCImpl)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -12,29 +12,31 @@
|
||||
#ifndef _WX_DCMEMORY_H_
|
||||
#define _WX_DCMEMORY_H_
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcmemory.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxMemoryDC : public wxDC, public wxMemoryDCBase
|
||||
class WXDLLEXPORT wxMemoryDCImpl: public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDC() { Init(); }
|
||||
wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
|
||||
wxMemoryDC(wxDC *dc); // Create compatible DC
|
||||
wxMemoryDCImpl( wxMemoryDC *owner );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
|
||||
|
||||
protected:
|
||||
// override some base class virtuals
|
||||
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
virtual void DoGetSize(int* width, int* height) const;
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const;
|
||||
|
||||
protected:
|
||||
// create DC compatible with the given one or screen if dc == NULL
|
||||
bool CreateCompatible(wxDC *dc);
|
||||
|
||||
// initialize the newly created DC
|
||||
void Init();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMemoryDC)
|
||||
DECLARE_CLASS(wxMemoryDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxMemoryDCImpl)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -12,24 +12,19 @@
|
||||
#ifndef _WX_DCSCREEN_H_
|
||||
#define _WX_DCSCREEN_H_
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxScreenDC : public wxWindowDC
|
||||
class WXDLLEXPORT wxScreenDCImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDC();
|
||||
wxScreenDCImpl( wxScreenDC *owner );
|
||||
|
||||
// Compatibility with X's requirements for drawing on top of all windows
|
||||
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; }
|
||||
static bool EndDrawingOnTop() { return TRUE; }
|
||||
virtual void DoGetSize(int *w, int *h) const;
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScreenDC)
|
||||
DECLARE_CLASS(wxScreenDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxScreenDCImpl)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "wx/panel.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar) wxDialogNameStr[];
|
||||
//WXDLLEXPORT_DATA(extern const wxChar) wxDialogNameStr[];
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDialogModalData;
|
||||
|
||||
|
@@ -37,6 +37,7 @@ public:
|
||||
|
||||
// process a single message
|
||||
virtual void ProcessMessage(WXMSG *msg);
|
||||
virtual void WakeUp();
|
||||
|
||||
protected:
|
||||
// should we exit the loop?
|
||||
|
396
include/wx/palmos/missing.h
Normal file
396
include/wx/palmos/missing.h
Normal file
@@ -0,0 +1,396 @@
|
||||
#ifndef _PALMOS_STDIO_FAKE_H
|
||||
#define _PALMOS_STDIO_FAKE_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <PalmTypes.h>
|
||||
#include <MemoryMgr.h> // Core/System/
|
||||
#include <StringMgr.h> // Core/System/
|
||||
#include <UIResources.h> // alertRscType,MenuRscType
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define _PSF_BEGIN_EXTERN_C extern "C" {
|
||||
#define _PSF_END_EXTERN_C }
|
||||
#else
|
||||
#define _PSF_BEGIN_EXTERN_C
|
||||
#define _PSF_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
#if __WXPALMOS6__
|
||||
#include <wchar.h> // wint_t
|
||||
#include <unistd.h> // access(), rmdir()
|
||||
#include <time.h>
|
||||
#include <StatusBar.h>
|
||||
#include <Loader.h>
|
||||
#else
|
||||
#if !defined(__MWERKS__)
|
||||
#include <PenInputMgr.h>
|
||||
#endif
|
||||
|
||||
#define uint32_t UInt32
|
||||
#define uint16_t UInt16
|
||||
#define uint8_t UInt8
|
||||
#endif // __WXPALMOS6__
|
||||
#if __WXPALMOS6__
|
||||
#define POS_DmGetResource(a,b,c) DmGetResource(a,b,c)
|
||||
#define POS_FrmSetMenu(a,b,c) FrmSetMenu(a,b,c)
|
||||
#define POS_FrmCustomAlert(a,b,c,d,e) FrmCustomAlert(a,b,c,d,e)
|
||||
#define POS_MemNumRAMHeaps(a) MemNumRAMHeaps()
|
||||
#else // __WXPALMOS6__
|
||||
#define POS_DmGetResource(a,b,c) DmGetResource(b,c)
|
||||
#define POS_FrmSetMenu(a,b,c) FrmSetMenu(a,c)
|
||||
#define POS_FrmCustomAlert(a,b,c,d,e) FrmCustomAlert(b,c,d,e)
|
||||
#define POS_MemNumRAMHeaps(a) MemNumRAMHeaps(a)
|
||||
#endif // __WXPALMOS6__
|
||||
|
||||
_PSF_BEGIN_EXTERN_C
|
||||
|
||||
#if __WXPALMOS5__
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
//#include <unix_stdarg.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define strcpy(x,y) StrCopy((char*)(x),(char*)(y))
|
||||
#define strncpy(x,y,z) StrNCopy((x),(y),(z))
|
||||
#define strcmp(x,y) StrCompare((x),(y))
|
||||
#define strcat(x,y) StrCat((x),(y))
|
||||
#define strlen(x) StrLen((char*)(x))
|
||||
#define strchr(x,y) StrChr((x),(y))
|
||||
#define strstr(x,y) StrStr((x),(y))
|
||||
|
||||
#define memcpy(x,y,z) ((0 == MemMove((x),(void *)(y),(z))) ? (x) : (0))
|
||||
#define memset(x,y,z) (MemSet((x),(z),(y)))
|
||||
#define memcmp(x,y,z) (MemCmp((x),(y),(z)))
|
||||
#endif
|
||||
|
||||
#include "sections.h"
|
||||
#ifndef int8_t
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int64_t long long
|
||||
#define uint64_t unsigned int64_t
|
||||
|
||||
#define wchar_t uint16_t
|
||||
#endif
|
||||
#define wint_t int
|
||||
|
||||
#define ssize_t long
|
||||
#define size_t uint32_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define malloc(x) MemPtrNew(x)
|
||||
#define free(x) MemPtrFree(x)
|
||||
void * realloc (void *p, size_t newsize);
|
||||
#endif
|
||||
char * strdup (const char *old);
|
||||
|
||||
// copy from Core/System/Unix/unix_stdio.h
|
||||
#ifndef _STDLIB
|
||||
#define sprintf StrPrintF
|
||||
#define vsprintf(x,y,z) StrVPrintF(x,(const Char *)y,z)
|
||||
#else
|
||||
int vsprintf(char *, const char *, _Va_list);
|
||||
#endif
|
||||
int sscanf(const char *, const char *, ...);
|
||||
|
||||
///////////////////// time ////////////////////
|
||||
#define time_t uint64_t
|
||||
time_t time(time_t *T);
|
||||
|
||||
#define JAN 0
|
||||
#define FEB 1
|
||||
#define MAR 2
|
||||
#define APR 3
|
||||
#define MAY 4
|
||||
#define JUN 5
|
||||
#define JUL 6
|
||||
#define AUG 7
|
||||
#define SEP 8
|
||||
#define OCT 9
|
||||
#define NOV 10
|
||||
#define DEC 11
|
||||
struct tm {
|
||||
int8_t tm_gmtoff;
|
||||
int8_t tm_isdst;
|
||||
uint8_t tm_sec;
|
||||
uint8_t tm_min;
|
||||
uint8_t tm_hour;
|
||||
uint8_t tm_wday;
|
||||
uint8_t tm_mday;
|
||||
uint8_t tm_mon;
|
||||
uint16_t tm_yday;
|
||||
uint64_t tm_year;
|
||||
};
|
||||
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
extern struct tm *localtime (const time_t *CLOCK); // datetime.cpp: GetTmNow(void)
|
||||
extern struct tm *localtime_r (const time_t *CLOCK, struct tm *RES);
|
||||
|
||||
#define HAVE_GMTIME_R 1
|
||||
extern struct tm *gmtime (const time_t *CLOCK);
|
||||
extern struct tm *gmtime_r (const time_t *CLOCK, struct tm *RES);
|
||||
|
||||
extern time_t mktime (struct tm *TIMP);
|
||||
double difftime (time_t TIM1, time_t TIM2);
|
||||
|
||||
char *ctime(const time_t *CLOCK);
|
||||
char *ctime_r(const time_t *CLOCK, char *BUF);
|
||||
|
||||
//#define HAVE_STRFTIME 1
|
||||
extern size_t strftime(char *S, size_t MAXSIZE, const char *FORMAT, const struct tm *TIMP);
|
||||
|
||||
///////////////////// locale.h ////////////////////
|
||||
struct lconv
|
||||
{
|
||||
char *decimal_point;
|
||||
char *thousands_sep;
|
||||
char *grouping;
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol;
|
||||
char *mon_decimal_point;
|
||||
char *mon_thousands_sep;
|
||||
char *mon_grouping;
|
||||
char *positive_sign;
|
||||
char *negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
char *setlocale(int CATEGORY, const char *LOCALE);
|
||||
struct lconv *localeconv(void);
|
||||
|
||||
char *_setlocale_r(void *REENT, int CATEGORY, const char *LOCALE);
|
||||
struct lconv *_localeconv_r(void *REENT);
|
||||
///////////////////// stdlib.h ////////////////////
|
||||
|
||||
#if !defined(__MWERKS__)
|
||||
#define wchar_t int
|
||||
#endif
|
||||
int _watoi(wchar_t * nptr);
|
||||
long _watol(wchar_t * nptr);
|
||||
double _watof(wchar_t *nptr);
|
||||
#define watoi(a) _watoi((wchar_t *)(a))
|
||||
#define watol(a) _watol((wchar_t *)(a))
|
||||
#define watof(a) _watof((wchar_t *)(a))
|
||||
int mbstowcs(wchar_t *PWC, const char *S, size_t N);
|
||||
int wcstombs(const char *S, wchar_t *PWC, size_t N);
|
||||
|
||||
///////////////////// fcntl.h ////////////////////
|
||||
#define O_RDONLY 0x01
|
||||
#define O_WRONLY 0x02
|
||||
#define O_RDWR 0x04
|
||||
#define O_APPEND 0x08
|
||||
#define O_CREAT 0x10
|
||||
#define O_TRUNC 0x20
|
||||
#define O_EXCL 0x40
|
||||
#define O_SYNC 0x80
|
||||
|
||||
// io.h
|
||||
int open (const char*, int, ...);
|
||||
int read (int, void*, unsigned int);
|
||||
int write (int, const void*, unsigned int);
|
||||
int close (int);
|
||||
long lseek (int, long, int);
|
||||
|
||||
///////////////////// stdio.h ////////////////////
|
||||
int remove(const char *FILENAME);
|
||||
int rename(const char *OLD, const char *NEW);
|
||||
|
||||
///////////////////// unistd.h ////////////////////
|
||||
int access (const char *path, int amode);
|
||||
int rmdir (const char *path);
|
||||
|
||||
///////////////////// FILE ////////////////////
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)(0))
|
||||
#endif
|
||||
|
||||
#define FILE void
|
||||
#undef stdin
|
||||
#undef stdout
|
||||
#undef stderr
|
||||
#define stdin NULL
|
||||
#define stdout NULL
|
||||
#define stderr NULL
|
||||
|
||||
#define SEEK_SET 0 /* set file offset to offset */
|
||||
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
||||
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
||||
|
||||
FILE * fopen (const char *_name, const char *_type);
|
||||
int fclose (FILE *);
|
||||
size_t fread (void *buf, size_t _size, size_t _n, FILE *);
|
||||
size_t fwrite (const void *buf , size_t _size, size_t _n, FILE *);
|
||||
int fseek (FILE *, long, int);
|
||||
long ftell ( FILE *);
|
||||
int feof (FILE *);
|
||||
int ferror (FILE *);
|
||||
void clearerr (FILE *);
|
||||
FILE *freopen(const char *fn, const char *mode, FILE *fp);
|
||||
//FILE *_freopen_r(struct _reent *PTR, const char *fn, const char *mode, FILE *fp);
|
||||
|
||||
extern int fflush (FILE *FP);
|
||||
extern int fputs (const char *S, FILE *FP);
|
||||
extern int fputc (int CH, FILE *FP);
|
||||
|
||||
//int printf(const char *format, ...);
|
||||
int fprintf(FILE *stream, const char *format, ...);
|
||||
//int sprintf(char *str, const char *format, ...);
|
||||
//int snprintf(char *str, size_t size, const char *format, ...);
|
||||
//int vfprintf(FILE * restrict stream, const char * restrict format, va_list ap);
|
||||
//int vsprintf(char * restrict str, const char * restrict format, va_list ap);
|
||||
//int vsnprintf(char * restrict str, size_t size, const char * restrict format, va_list ap);
|
||||
int vsscanf (const char *s, const char *format, va_list param);
|
||||
|
||||
///////////////////// string ////////////////////
|
||||
char *strerror(int ERRNUM);
|
||||
|
||||
///////////////////// ctype.h ////////////////////
|
||||
extern int isascii(int C);
|
||||
|
||||
///////////////////// stdlib ////////////////////
|
||||
void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
|
||||
void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, int (*compar)(void *, const void *, const void *));
|
||||
//int heapsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
|
||||
//int mergesort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
|
||||
void *bsearch(const void *key, const void *base, size_t nmemb,size_t size, int (*compar)(const void *, const void *));
|
||||
|
||||
char *getenv(const char *NAME);
|
||||
|
||||
double atof(const char *S);
|
||||
double strtod(const char *STR, char **TAIL);
|
||||
double _strtod_r(void *REENT, const char *STR, char **TAIL);
|
||||
|
||||
///////////////////// math.h ////////////////////
|
||||
#define __IMPORT
|
||||
|
||||
union __dmath
|
||||
{
|
||||
unsigned long i[2];
|
||||
double d;
|
||||
};
|
||||
|
||||
union __fmath
|
||||
{
|
||||
unsigned long i[1];
|
||||
float f;
|
||||
};
|
||||
|
||||
union __ldmath
|
||||
{
|
||||
unsigned long i[4];
|
||||
long double ld;
|
||||
};
|
||||
#if defined(__GNUC__) && \
|
||||
( (__GNUC__ >= 4) || \
|
||||
( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
|
||||
|
||||
/* gcc >= 3.3 implicitly defines builtins for HUGE_VALx values. */
|
||||
|
||||
#ifndef HUGE_VAL
|
||||
#define HUGE_VAL (__builtin_huge_val())
|
||||
#endif
|
||||
|
||||
#ifndef HUGE_VALF
|
||||
#define HUGE_VALF (__builtin_huge_valf())
|
||||
#endif
|
||||
|
||||
#ifndef HUGE_VALL
|
||||
#define HUGE_VALL (__builtin_huge_vall())
|
||||
#endif
|
||||
|
||||
#else /* !gcc >= 3.3 */
|
||||
|
||||
/* No builtins. Use floating-point unions instead. Declare as an array
|
||||
without bounds so no matter what small data support a port and/or
|
||||
library has, the reference will be via the general method for accessing
|
||||
globals. */
|
||||
|
||||
#ifndef HUGE_VAL
|
||||
extern __IMPORT const union __dmath __infinity[];
|
||||
#define HUGE_VAL (__infinity[0].d)
|
||||
#endif
|
||||
|
||||
#ifndef HUGE_VALF
|
||||
extern __IMPORT const union __fmath __infinityf[];
|
||||
#define HUGE_VALF (__infinityf[0].f)
|
||||
#endif
|
||||
|
||||
#ifndef HUGE_VALL
|
||||
extern __IMPORT const union __ldmath __infinityld[];
|
||||
#define HUGE_VALL (__infinityld[0].ld)
|
||||
#endif
|
||||
|
||||
#endif /* !gcc >= 3.3 */
|
||||
#undef __IMPORT
|
||||
|
||||
///////////////////// PalmOS6 ////////////////////
|
||||
#define status_t Err
|
||||
|
||||
// TimeMgr.h
|
||||
time_t SysTimeToMilliSecs(time_t systime);
|
||||
time_t SysTimeInSecs(time_t secs);
|
||||
|
||||
///////////////////// END ////////////////////
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __WXPALMOS5__
|
||||
|
||||
///////////////////// wctype.h ////////////////////
|
||||
extern int iswalnum(wint_t C);
|
||||
extern int iswalpha(wint_t C);
|
||||
extern int iswcntrl(wint_t C);
|
||||
extern int iswdigit(wint_t C);
|
||||
extern int iswgraph(wint_t C);
|
||||
extern int iswlower(wint_t C);
|
||||
extern int iswprint(wint_t C);
|
||||
extern int iswpunct(wint_t C);
|
||||
extern int iswspace(wint_t C);
|
||||
extern int iswupper(wint_t C);
|
||||
extern int iswxdigit(wint_t C);
|
||||
|
||||
extern wint_t towlower(wint_t C);
|
||||
extern wint_t towupper(wint_t C);
|
||||
extern size_t wcsftime(wchar_t *strDest, size_t maxsize, const wchar_t *format, const struct tm *timeptr);
|
||||
|
||||
size_t wcslen (const wchar_t * str);
|
||||
wchar_t * wcscpy (wchar_t * dst, const wchar_t * src);
|
||||
wchar_t * wcsncpy (wchar_t * dst, const wchar_t * src, size_t n);
|
||||
wchar_t * wcscat (wchar_t * dst, const wchar_t * src);
|
||||
wchar_t * wcsncat (wchar_t * dst, const wchar_t * src, size_t n);
|
||||
int wcscmp (const wchar_t * str1, const wchar_t * str2);
|
||||
int wcsncmp (const wchar_t * str1, const wchar_t * str2, size_t n);
|
||||
wchar_t * wcschr (const wchar_t * str, const wchar_t chr);
|
||||
int wcscoll (const wchar_t *str1, const wchar_t * str2);
|
||||
size_t wcsxfrm (wchar_t * str1, const wchar_t * str2, size_t n);
|
||||
wchar_t * wcsrchr (const wchar_t * str, wchar_t chr);
|
||||
wchar_t * wcspbrk (const wchar_t * str, const wchar_t * set);
|
||||
size_t wcsspn (const wchar_t * str, const wchar_t * set);
|
||||
size_t wcscspn (const wchar_t * str, const wchar_t * set);
|
||||
wchar_t * wcsstr (const wchar_t * str, const wchar_t * pat);
|
||||
wchar_t * wcstok (wchar_t * str, const wchar_t * set, wchar_t ** );
|
||||
|
||||
long wcstol (const wchar_t * str, wchar_t ** end, int base);
|
||||
unsigned long wcstoul (const wchar_t * a, wchar_t ** b, int c);
|
||||
double wcstod (const wchar_t * a, wchar_t ** b);
|
||||
|
||||
char * setlocale (int category, const char *locale);
|
||||
|
||||
_PSF_END_EXTERN_C
|
||||
|
||||
#endif // _PALMOS_STDIO_FAKE_H
|
@@ -13,7 +13,8 @@
|
||||
#ifndef _WX_TOGGLEBUTTON_H_
|
||||
#define _WX_TOGGLEBUTTON_H_
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar) wxCheckBoxNameStr[];
|
||||
#include "wx/checkbox.h" // wxCheckBoxNameStr, in Datacmn.cpp
|
||||
//WXDLLEXPORT_DATA(extern const wxChar) wxCheckBoxNameStr[];
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLEXPORT wxToggleButton : public wxToggleButtonBase
|
||||
|
@@ -132,8 +132,9 @@ public:
|
||||
// simple accessors
|
||||
// ----------------
|
||||
|
||||
virtual WXWINHANDLE GetWinHandle() const { return m_handle; }
|
||||
virtual WXWidget GetHandle() const { return GetWinHandle(); }
|
||||
WXHWND GetHWND() const { return m_hWnd; }
|
||||
void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
|
||||
virtual WXWidget GetHandle() const { return GetHWND(); }
|
||||
|
||||
// event handlers
|
||||
// --------------
|
||||
@@ -208,7 +209,7 @@ public:
|
||||
|
||||
protected:
|
||||
// the window handle
|
||||
WXWINHANDLE m_handle;
|
||||
WXHWND m_hWnd;
|
||||
WXFORMPTR FrameForm;
|
||||
|
||||
WXFORMPTR GetFormPtr();
|
||||
|
Reference in New Issue
Block a user