Use __WXPALMOS__ for PalmOS port which fits __WX$(TOOLKIT)__ of bakefiles. Do not depend on MSW macros in PalmOS port. Source cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-12-20 12:44:22 +00:00
parent 6305fabeeb
commit 4055ed8281
85 changed files with 499 additions and 811 deletions

View File

@ -561,7 +561,7 @@ protected:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_GUI #if wxUSE_GUI
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/app.h" #include "wx/palmos/app.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/app.h" #include "wx/msw/app.h"

View File

@ -79,7 +79,9 @@ public:
// wxStandardPaths object is normally the same for wxBase and wxGUI // wxStandardPaths object is normally the same for wxBase and wxGUI
// except in the case of wxMac and wxCocoa // except in the case of wxMac and wxCocoa
#ifndef __WXPALMOS__
virtual wxStandardPathsBase& GetStandardPaths(); virtual wxStandardPathsBase& GetStandardPaths();
#endif
// functions abstracting differences between GUI and console modes // functions abstracting differences between GUI and console modes
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
@ -139,7 +141,7 @@ public:
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the // NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
// Unix code (and otherwise __UNIX__ wouldn't be defined) // Unix code (and otherwise __UNIX__ wouldn't be defined)
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/apptbase.h" #include "wx/palmos/apptbase.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/apptbase.h" #include "wx/msw/apptbase.h"
@ -224,7 +226,7 @@ public:
// include the platform-specific version of the classes above // include the platform-specific version of the classes above
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/apptrait.h" #include "wx/palmos/apptrait.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/apptrait.h" #include "wx/msw/apptrait.h"

View File

@ -163,7 +163,7 @@ protected:
}; };
#endif #endif
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/bitmap.h" #include "wx/palmos/bitmap.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/bitmap.h" #include "wx/msw/bitmap.h"

View File

@ -17,7 +17,7 @@ public:
{ return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); } { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
}; };
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/brush.h" #include "wx/palmos/brush.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/brush.h" #include "wx/msw/brush.h"

View File

@ -15,7 +15,7 @@
Compiler-specific checking. Compiler-specific checking.
*/ */
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
# include "wx/palmos/chkconf.h" # include "wx/palmos/chkconf.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
# include "wx/msw/chkconf.h" # include "wx/msw/chkconf.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_COLOUR_H_BASE_ #ifndef _WX_COLOUR_H_BASE_
#define _WX_COLOUR_H_BASE_ #define _WX_COLOUR_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/colour.h" #include "wx/palmos/colour.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/colour.h" #include "wx/msw/colour.h"

View File

@ -100,7 +100,7 @@ protected:
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/control.h" #include "wx/univ/control.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/control.h" #include "wx/palmos/control.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/control.h" #include "wx/msw/control.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_CURSOR_H_BASE_ #ifndef _WX_CURSOR_H_BASE_
#define _WX_CURSOR_H_BASE_ #define _WX_CURSOR_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/cursor.h" #include "wx/palmos/cursor.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/cursor.h" #include "wx/msw/cursor.h"

View File

@ -791,7 +791,7 @@ private:
// now include the declaration of wxDC class // now include the declaration of wxDC class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dc.h" #include "wx/palmos/dc.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dc.h" #include "wx/msw/dc.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_DCCLIENT_H_BASE_ #ifndef _WX_DCCLIENT_H_BASE_
#define _WX_DCCLIENT_H_BASE_ #define _WX_DCCLIENT_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dcclient.h" #include "wx/palmos/dcclient.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dcclient.h" #include "wx/msw/dcclient.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_DCMEMORY_H_BASE_ #ifndef _WX_DCMEMORY_H_BASE_
#define _WX_DCMEMORY_H_BASE_ #define _WX_DCMEMORY_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dcmemory.h" #include "wx/palmos/dcmemory.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dcmemory.h" #include "wx/msw/dcmemory.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_DCPRINT_H_BASE_ #ifndef _WX_DCPRINT_H_BASE_
#define _WX_DCPRINT_H_BASE_ #define _WX_DCPRINT_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dcprint.h" #include "wx/palmos/dcprint.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dcprint.h" #include "wx/msw/dcprint.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_DCSCREEN_H_BASE_ #ifndef _WX_DCSCREEN_H_BASE_
#define _WX_DCSCREEN_H_BASE_ #define _WX_DCSCREEN_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dcscreen.h" #include "wx/palmos/dcscreen.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dcscreen.h" #include "wx/msw/dcscreen.h"

View File

@ -26,8 +26,11 @@
/* Make sure the environment is set correctly */ /* Make sure the environment is set correctly */
# if defined(__WXMSW__) && defined(__X__) # if defined(__WXMSW__) && defined(__X__)
# error "Target can't be both X and Windows" # error "Target can't be both X and Windows"
# elif defined(__WXMSW__) && defined(__PALMOS__)
# error "Target can't be both PalmOS and Windows"
# elif !defined(__WXMOTIF__) && \ # elif !defined(__WXMOTIF__) && \
!defined(__WXMSW__) && \ !defined(__WXMSW__) && \
!defined(__WXPALMOS__)&& \
!defined(__WXGTK__) && \ !defined(__WXGTK__) && \
!defined(__WXPM__) && \ !defined(__WXPM__) && \
!defined(__WXMAC__) && \ !defined(__WXMAC__) && \
@ -678,7 +681,17 @@ typedef wxUint16 wxWord;
*/ */
/* 32bit */ /* 32bit */
#ifdef __WINDOWS__ #ifdef __PALMOS__
typedef int wxInt32;
typedef unsigned int wxUint32;
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_WCHAR_T 2
#define SIZEOF_SIZE_T 4
#define wxSIZE_T_IS_UINT
#define SIZEOF_VOID_P 4
#define SIZEOF_SIZE_T 4
#elif defined(__WINDOWS__)
/* Win64 uses LLP64 model and so ints and longs have the same size as in */ /* Win64 uses LLP64 model and so ints and longs have the same size as in */
/* Win32 */ /* Win32 */
#if defined(__WIN32__) #if defined(__WIN32__)
@ -2326,7 +2339,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSView);
typedef WX_NSView WXWidget; /* wxWidgets BASE definition */ typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
#endif /* __WXCOCOA__ */ #endif /* __WXCOCOA__ */
#ifdef __WXMSW__ #if defined(__WXMSW__) || defined(__WXPALMOS__)
/* the keywords needed for WinMain() declaration */ /* the keywords needed for WinMain() declaration */
#ifndef WXFAR #ifndef WXFAR

View File

@ -71,7 +71,7 @@ protected:
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__) #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
#include "wx/univ/dialog.h" #include "wx/univ/dialog.h"
#else #else
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/dialog.h" #include "wx/palmos/dialog.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/dialog.h" #include "wx/msw/dialog.h"

View File

@ -35,7 +35,7 @@
struct WXDLLEXPORT wxNativeEncodingInfo struct WXDLLEXPORT wxNativeEncodingInfo
{ {
wxString facename; // may be empty meaning "any" wxString facename; // may be empty meaning "any"
#ifndef __PALMOS__ #ifndef __WXPALMOS__
wxFontEncoding encoding; // so that we know what this struct represents wxFontEncoding encoding; // so that we know what this struct represents
#if defined(__WXMSW__) || \ #if defined(__WXMSW__) || \

View File

@ -72,7 +72,7 @@ protected:
// can sometimes be very useful (e.g. under MSW this is necessary for // can sometimes be very useful (e.g. under MSW this is necessary for
// integration with MFC) but currently this is done for MSW only, other ports // integration with MFC) but currently this is done for MSW only, other ports
// should follow a.s.a.p. // should follow a.s.a.p.
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/evtloop.h" #include "wx/palmos/evtloop.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/evtloop.h" #include "wx/msw/evtloop.h"

View File

@ -173,7 +173,7 @@ enum wxSeekMode
// detect compilers which have support for huge files (currently only // detect compilers which have support for huge files (currently only
// Digital Mars doesn't) // Digital Mars doesn't)
#ifndef __PALMOS__ #ifndef __WXPALMOS__
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
@ -299,7 +299,7 @@ enum wxSeekMode
#endif #endif
// constants (unless already defined by the user code) // constants (unless already defined by the user code)
#if !defined(__BORLANDC__) && !defined(__WATCOMC__) && !defined(__PALMOS__) #if !defined(__BORLANDC__) && !defined(__WATCOMC__) && !defined(__WXPALMOS__)
#ifndef O_RDONLY #ifndef O_RDONLY
#define O_RDONLY _O_RDONLY #define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY #define O_WRONLY _O_WRONLY

View File

@ -142,7 +142,7 @@ public:
int family, // see wxFontFamily enum int family, // see wxFontFamily enum
int style, // see wxFontStyle enum int style, // see wxFontStyle enum
int weight, // see wxFontWeight enum int weight, // see wxFontWeight enum
bool underlined = FALSE, // not underlined by default bool underlined = false, // not underlined by default
const wxString& face = wxEmptyString, // facename const wxString& face = wxEmptyString, // facename
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ... wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ...
@ -231,7 +231,7 @@ private:
}; };
// include the real class declaration // include the real class declaration
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/font.h" #include "wx/palmos/font.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/font.h" #include "wx/msw/font.h"

View File

@ -26,7 +26,7 @@
#include "wx/font.h" // for wxFont and wxFontEncoding #include "wx/font.h" // for wxFont and wxFontEncoding
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
@ -109,7 +109,7 @@ public:
// set the XFLD // set the XFLD
void SetXFontName(const wxString& xFontName); void SetXFontName(const wxString& xFontName);
#elif defined(__WXMSW__) && !defined(__PALMOS__) #elif defined(__WXMSW__) && !defined(__WXPALMOS__)
LOGFONT lf; LOGFONT lf;
#elif defined(__WXPM__) #elif defined(__WXPM__)
// OS/2 native structures that define a font // OS/2 native structures that define a font

View File

@ -247,7 +247,7 @@ protected:
#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__) #if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__)
#include "wx/univ/frame.h" #include "wx/univ/frame.h"
#else // !__WXUNIVERSAL__ #else // !__WXUNIVERSAL__
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/frame.h" #include "wx/palmos/frame.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/frame.h" #include "wx/msw/frame.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_GDIOBJ_H_BASE_ #ifndef _WX_GDIOBJ_H_BASE_
#define _WX_GDIOBJ_H_BASE_ #define _WX_GDIOBJ_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/gdiobj.h" #include "wx/palmos/gdiobj.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/gdiobj.h" #include "wx/msw/gdiobj.h"

View File

@ -9,7 +9,7 @@
#include "wx/msw/wince/helpwce.h" #include "wx/msw/wince/helpwce.h"
#define wxHelpController wxWinceHelpController #define wxHelpController wxWinceHelpController
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/help.h" #include "wx/palmos/help.h"
#define wxHelpController wxPalmHelpController #define wxHelpController wxPalmHelpController

View File

@ -3,7 +3,7 @@
#include "wx/iconloc.h" #include "wx/iconloc.h"
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/icon.h" #include "wx/palmos/icon.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/icon.h" #include "wx/msw/icon.h"

View File

@ -498,7 +498,7 @@ protected:
#else // !wxUSE_BASE_CLASSES_ONLY #else // !wxUSE_BASE_CLASSES_ONLY
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/menu.h" #include "wx/univ/menu.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/menu.h" #include "wx/palmos/menu.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/menu.h" #include "wx/msw/menu.h"

View File

@ -155,7 +155,7 @@ private:
#else // !wxUSE_BASE_CLASSES_ONLY #else // !wxUSE_BASE_CLASSES_ONLY
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/menuitem.h" #include "wx/univ/menuitem.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/menuitem.h" #include "wx/palmos/menuitem.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/menuitem.h" #include "wx/msw/menuitem.h"

View File

@ -21,7 +21,7 @@
#if defined(__WXMSW__) #if defined(__WXMSW__)
#if wxUSE_ENH_METAFILE #if wxUSE_ENH_METAFILE
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/enhmeta.h" #include "wx/palmos/enhmeta.h"
#else #else
#include "wx/msw/enhmeta.h" #include "wx/msw/enhmeta.h"
@ -38,7 +38,7 @@
#define wxMETAFILE_IS_ENH #define wxMETAFILE_IS_ENH
#endif // wxUSE_WIN_METAFILES_ALWAYS #endif // wxUSE_WIN_METAFILES_ALWAYS
#else // !wxUSE_ENH_METAFILE #else // !wxUSE_ENH_METAFILE
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/metafile.h" #include "wx/palmos/metafile.h"
#else #else
#include "wx/msw/metafile.h" #include "wx/msw/metafile.h"

View File

@ -1,7 +1,7 @@
#ifndef _WX_MINIFRAM_H_BASE_ #ifndef _WX_MINIFRAM_H_BASE_
#define _WX_MINIFRAMH_BASE_ #define _WX_MINIFRAMH_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/minifram.h" #include "wx/palmos/minifram.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/minifram.h" #include "wx/msw/minifram.h"

View File

@ -7,7 +7,7 @@
#if defined(__WXUNIVERSAL__) || defined(__WXGPE__) #if defined(__WXUNIVERSAL__) || defined(__WXGPE__)
#include "wx/generic/msgdlgg.h" #include "wx/generic/msgdlgg.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/msgdlg.h" #include "wx/palmos/msgdlg.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/msgdlg.h" #include "wx/msw/msgdlg.h"

View File

@ -18,7 +18,7 @@ public:
virtual int GetColoursCount() const { wxFAIL_MSG( _T("not implemented") ); return 0; }; virtual int GetColoursCount() const { wxFAIL_MSG( _T("not implemented") ); return 0; };
}; };
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/palette.h" #include "wx/palmos/palette.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/palette.h" #include "wx/msw/palette.h"

View File

@ -99,7 +99,6 @@ protected:
extern int WXDLLEXPORT extern int WXDLLEXPORT
wxEntry(); wxEntry();
#include <PalmOS.h>
#define IMPLEMENT_WXWIN_MAIN \ #define IMPLEMENT_WXWIN_MAIN \
uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \ uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \
{ \ { \

View File

@ -198,11 +198,6 @@ protected:
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
private: private:
#ifdef __WIN32__
// common part of CopyFromIcon/CopyFromCursor for Win32
bool CopyFromIconOrCursor(const wxGDIImage& icon);
#endif // __WIN32__
DECLARE_DYNAMIC_CLASS(wxBitmap) DECLARE_DYNAMIC_CLASS(wxBitmap)
}; };

View File

@ -60,19 +60,8 @@ public:
wxControl::SetBackgroundColour(bg); wxControl::SetBackgroundColour(bg);
} }
#ifdef __WIN32__
// coloured buttons support
virtual bool SetBackgroundColour(const wxColour &colour);
virtual bool SetForegroundColour(const wxColour &colour);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
private:
void MakeOwnerDrawn();
#endif // __WIN32__
protected: protected:
// send a notification event, return TRUE if processed // send a notification event, return true if processed
bool SendClickEvent(); bool SendClickEvent();
// default button handling // default button handling

View File

@ -96,23 +96,6 @@
#define wxUSE_CHECKLISTBOX 0 #define wxUSE_CHECKLISTBOX 0
#endif #endif
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
/* BC++ 4.0 can't compile JPEG library */
#undef wxUSE_LIBJPEG
#define wxUSE_LIBJPEG 0
#endif
/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
#undef wxUSE_DEBUG_NEW_ALWAYS
#define wxUSE_DEBUG_NEW_ALWAYS 0
#endif
#if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
#undef wxUSE_WCHAR_T
#define wxUSE_WCHAR_T 0
#endif
#endif #endif
/* _WX_PALMOS_CHKCONF_H_ */ /* _WX_PALMOS_CHKCONF_H_ */

View File

@ -31,10 +31,6 @@
void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
{ {
#ifdef __WXMSW__
::UpdateWindow((HWND) GetHWND()); // We need to implement this in wxWidgets
#endif
CaptureMouse(); CaptureMouse();
m_dragImage = new wxDragImage(* this, itemId); m_dragImage = new wxDragImage(* this, itemId);
@ -62,11 +58,6 @@
// Do some updating of the window, such as highlighting the drop target // Do some updating of the window, such as highlighting the drop target
... ...
#ifdef __WXMSW__
if (updateWindow)
::UpdateWindow((HWND) GetHWND());
#endif
// Move and show the image again // Move and show the image again
m_dragImage->Move(event.GetPosition(), this); m_dragImage->Move(event.GetPosition(), this);
m_dragImage->Show(this); m_dragImage->Show(this);
@ -216,7 +207,7 @@ public:
// Begin drag. hotspot is the location of the drag position relative to the upper-left // Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. // corner of the image.
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = FALSE, wxRect* rect = (wxRect*) NULL); bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL);
// Begin drag. hotspot is the location of the drag position relative to the upper-left // Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. This is full screen only. fullScreenRect gives the // corner of the image. This is full screen only. fullScreenRect gives the

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/palmos/enhmeta.h // Name: wx/palmos/enhmeta.h
// Purpose: wxEnhMetaFile class for Win32 // Purpose: wxEnhMetaFile class for PalmOS
// Author: William Osborne // Author: William Osborne
// Modified by: // Modified by:
// Created: 10/13/04 // Created: 10/13/04

View File

@ -127,14 +127,6 @@ public:
virtual WXHANDLE GetResourceHandle() const; virtual WXHANDLE GetResourceHandle() const;
virtual bool FreeResource(bool force = false); virtual bool FreeResource(bool force = false);
// for consistency with other wxMSW classes
WXHFONT GetHFONT() const;
/*
virtual bool UseResource();
virtual bool ReleaseResource();
*/
protected: protected:
// real font creation function, used in all cases // real font creation function, used in all cases
bool DoCreate(int size, bool DoCreate(int size,

View File

@ -4,6 +4,9 @@
#ifndef _WX_MSW_GCCPRIV_H_ #ifndef _WX_MSW_GCCPRIV_H_
#define _WX_MSW_GCCPRIV_H_ #define _WX_MSW_GCCPRIV_H_
#include <PalmOS.h>
#undef Abs
#if defined(__MINGW32__) && !defined(__GNUWIN32__) #if defined(__MINGW32__) && !defined(__GNUWIN32__)
#define __GNUWIN32__ #define __GNUWIN32__
#endif #endif

View File

@ -102,7 +102,7 @@ private:
// terminate the current radio group, if any // terminate the current radio group, if any
void EndRadioGroup(); void EndRadioGroup();
// if TRUE, insert a break before appending the next item // if true, insert a break before appending the next item
bool m_doBreak; bool m_doBreak;
// the position of the first item in the current radio group or -1 // the position of the first item in the current radio group or -1
@ -175,17 +175,6 @@ public:
void LoadMenu(); void LoadMenu();
int ProcessCommand(int ItemID); int ProcessCommand(int ItemID);
#if wxUSE_TOOLBAR && defined(__WXWINCE__) && (_WIN32_WCE < 400 || defined(__POCKETPC__) || defined(__SMARTPHONE__))
// Under WinCE, a menubar is owned by the frame's toolbar
void SetToolBar(wxToolBar* toolBar) { m_toolBar = toolBar; }
wxToolBar* GetToolBar() const { return m_toolBar; }
#endif
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))
WXHWND GetCommandBar() const { return m_commandBar; }
bool AddAdornments(long style);
#endif
#if wxUSE_ACCEL #if wxUSE_ACCEL
// get the accel table for all the menus // get the accel table for all the menus
const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; } const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
@ -225,13 +214,6 @@ protected:
#if defined(__WXWINCE__) && wxUSE_TOOLBAR #if defined(__WXWINCE__) && wxUSE_TOOLBAR
wxToolBar* m_toolBar; wxToolBar* m_toolBar;
#endif #endif
// Not using a combined wxToolBar/wxMenuBar? then use
// a commandbar in WinCE .NET to implement the
// menubar, since there is no ::SetMenu function.
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))
WXHWND m_commandBar;
bool m_adornmentsAdded;
#endif
private: private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar) DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar)

View File

@ -17,7 +17,7 @@
#include "wx/wxchar.h" #include "wx/wxchar.h"
#if !wxUSE_UNICODE_MSLU #if !wxUSE_UNICODE_MSLU
inline bool wxUsingUnicowsDll() { return FALSE; } inline bool wxUsingUnicowsDll() { return false; }
#else #else
// Returns true if we are running under Unicode emulation in Win9x environment. // Returns true if we are running under Unicode emulation in Win9x environment.
@ -56,17 +56,6 @@ WXDLLEXPORT int wxMSLU_GetSaveFileNameW(void *ofn);
WXDLLEXPORT int wxMSLU__trename(const wxChar *oldname, const wxChar *newname); WXDLLEXPORT int wxMSLU__trename(const wxChar *oldname, const wxChar *newname);
WXDLLEXPORT int wxMSLU__tremove(const wxChar *name); WXDLLEXPORT int wxMSLU__tremove(const wxChar *name);
#if defined( __VISUALC__ ) \
|| ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
|| ( defined(__MWERKS__) && defined(__WXMSW__) ) \
|| ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) )
WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode);
WXDLLEXPORT int wxMSLU__waccess(const wxChar *name, int mode);
WXDLLEXPORT int wxMSLU__wmkdir(const wxChar *name);
WXDLLEXPORT int wxMSLU__wrmdir(const wxChar *name);
WXDLLEXPORT int wxMSLU__wstat(const wxChar *name, struct _stat *buffer);
#endif
#endif // wxUSE_UNICODE_MSLU #endif // wxUSE_UNICODE_MSLU
#endif // _WX_MSLU_H_ #endif // _WX_MSLU_H_

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/palmos/popupwin.h // Name: wx/palmos/popupwin.h
// Purpose: wxPopupWindow class for wxMSW // Purpose: wxPopupWindow class for PalmOS
// Author: William Osborne // Author: William Osborne
// Modified by: // Modified by:
// Created: 10/13/04 // Created: 10/13/04
@ -30,7 +30,7 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE); bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual bool Show(bool show = TRUE); virtual bool Show(bool show = true);
protected: protected:
// popups handle the position like wxTopLevelWindow, not wxWindow // popups handle the position like wxTopLevelWindow, not wxWindow

View File

@ -42,38 +42,12 @@ public:
{ {
Type_None, // No value type Type_None, // No value type
Type_String, // Unicode nul terminated string Type_String, // Unicode nul terminated string
#ifdef __WIN32__
Type_Expand_String, // Unicode nul terminated string
// (with environment variable references)
Type_Binary, // Free form binary
Type_Dword, // 32-bit number
Type_Dword_little_endian // 32-bit number
= Type_Dword, // (same as Type_DWORD)
Type_Dword_big_endian, // 32-bit number
Type_Link, // Symbolic Link (unicode)
Type_Multi_String, // Multiple Unicode strings
Type_Resource_list, // Resource list in the resource map
Type_Full_resource_descriptor, // Resource list in the hardware description
Type_Resource_requirements_list // ???
#endif //WIN32
}; };
// predefined registry keys // predefined registry keys
enum StdKey enum StdKey
{ {
HKCR // classes root HKCR // classes root
#ifdef __WIN32__
,
HKCU, // current user
HKLM, // local machine
HKUSR, // users
HKPD // performance data (WinNT/2K only)
#if WINVER >= 0x0400
,
HKCC, // current config (starting from Win95/NT 4.0)
HKDD // dynamic data (Win95/98 only)
#endif // Winver
#endif // Win32/16
}; };
// access mode for the key // access mode for the key
@ -121,7 +95,7 @@ public:
// get infomation about the key // get infomation about the key
// get the (full) key name. Abbreviate std root keys if bShortPrefix. // get the (full) key name. Abbreviate std root keys if bShortPrefix.
wxString GetName(bool bShortPrefix = TRUE) const; wxString GetName(bool bShortPrefix = true) const;
// return true if the key exists // return true if the key exists
bool Exists() const; bool Exists() const;
// get the info about key (any number of these pointers may be NULL) // get the info about key (any number of these pointers may be NULL)
@ -139,7 +113,7 @@ public:
// which need the key to be opened if the key is not opened yet) // which need the key to be opened if the key is not opened yet)
bool Open(AccessMode mode = Write); bool Open(AccessMode mode = Write);
// create the key: will fail if the key already exists and !bOkIfExists // create the key: will fail if the key already exists and !bOkIfExists
bool Create(bool bOkIfExists = TRUE); bool Create(bool bOkIfExists = true);
// rename a value from old name to new one // rename a value from old name to new one
bool RenameValue(const wxChar *szValueOld, const wxChar *szValueNew); bool RenameValue(const wxChar *szValueOld, const wxChar *szValueNew);
// rename the key // rename the key
@ -166,14 +140,12 @@ public:
// access to values and subkeys // access to values and subkeys
// get value type // get value type
ValueType GetValueType(const wxChar *szValue) const; ValueType GetValueType(const wxChar *szValue) const;
// returns TRUE if the value contains a number (else it's some string) // returns true if the value contains a number (else it's some string)
bool IsNumericValue(const wxChar *szValue) const; bool IsNumericValue(const wxChar *szValue) const;
// assignment operators set the default value of the key // assignment operators set the default value of the key
wxRegKey& operator=(const wxString& strValue) wxRegKey& operator=(const wxString& strValue)
{ SetValue(NULL, strValue); return *this; } { SetValue(NULL, strValue); return *this; }
wxRegKey& operator=(long lValue)
{ SetValue(NULL, lValue); return *this; }
// query the default value of the key: implicitly or explicitly // query the default value of the key: implicitly or explicitly
wxString QueryDefaultValue() const; wxString QueryDefaultValue() const;
@ -185,20 +157,13 @@ public:
bool SetValue(const wxChar *szValue, const wxString& strValue); bool SetValue(const wxChar *szValue, const wxString& strValue);
// retrieve the string value // retrieve the string value
bool QueryValue(const wxChar *szValue, wxString& strValue) const bool QueryValue(const wxChar *szValue, wxString& strValue) const
{ return QueryValue(szValue, strValue, FALSE); } { return QueryValue(szValue, strValue, false); }
// retrieve raw string value // retrieve raw string value
bool QueryRawValue(const wxChar *szValue, wxString& strValue) const bool QueryRawValue(const wxChar *szValue, wxString& strValue) const
{ return QueryValue(szValue, strValue, TRUE); } { return QueryValue(szValue, strValue, true); }
// retrieve either raw or expanded string value // retrieve either raw or expanded string value
bool QueryValue(const wxChar *szValue, wxString& strValue, bool raw) const; bool QueryValue(const wxChar *szValue, wxString& strValue, bool raw) const;
#ifdef __WIN32__
// set the numeric value
bool SetValue(const wxChar *szValue, long lValue);
// return the numeric value
bool QueryValue(const wxChar *szValue, long *plValue) const;
#endif //Win32
// query existence of a key/value // query existence of a key/value
// return true if value exists // return true if value exists
bool HasValue(const wxChar *szKey) const; bool HasValue(const wxChar *szKey) const;

View File

@ -84,10 +84,6 @@ public:
virtual void WriteText(const wxString& text); virtual void WriteText(const wxString& text);
virtual void AppendText(const wxString& text); virtual void AppendText(const wxString& text);
#ifdef __WIN32__
virtual bool EmulateKeyPress(const wxKeyEvent& event);
#endif // __WIN32__
#if wxUSE_RICHEDIT #if wxUSE_RICHEDIT
// apply text attribute to the range of text (only works with richedit // apply text attribute to the range of text (only works with richedit
// controls) // controls)
@ -216,10 +212,10 @@ protected:
// replace the contents of the selection or of the entire control with the // replace the contents of the selection or of the entire control with the
// given text // given text
void DoWriteText(const wxString& text, bool selectionOnly = TRUE); void DoWriteText(const wxString& text, bool selectionOnly = true);
// set the selection possibly without scrolling the caret into view // set the selection possibly without scrolling the caret into view
void DoSetSelection(long from, long to, bool scrollCaret = TRUE); void DoSetSelection(long from, long to, bool scrollCaret = true);
// return true if there is a non empty selection in the control // return true if there is a non empty selection in the control
bool HasSelection() const; bool HasSelection() const;
@ -228,7 +224,7 @@ protected:
// position // position
long GetLengthOfLineContainingPos(long pos) const; long GetLengthOfLineContainingPos(long pos) const;
// send TEXT_UPDATED event, return TRUE if it was handled, FALSE otherwise // send TEXT_UPDATED event, return true if it was handled, false otherwise
bool SendUpdateEvent(); bool SendUpdateEvent();
// override some base class virtuals // override some base class virtuals
@ -244,7 +240,7 @@ protected:
int m_verRichEdit; int m_verRichEdit;
#endif // wxUSE_RICHEDIT #endif // wxUSE_RICHEDIT
// if TRUE, SendUpdateEvent() will eat the next event (see comments in the // if true, SendUpdateEvent() will eat the next event (see comments in the
// code as to why this is needed) // code as to why this is needed)
bool m_suppressNextUpdate; bool m_suppressNextUpdate;

View File

@ -16,10 +16,6 @@
#pragma interface "toplevel.h" #pragma interface "toplevel.h"
#endif #endif
#ifdef __PALMOS__
#include <PalmOS.h>
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxTopLevelWindowPalm // wxTopLevelWindowPalm
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -63,9 +59,9 @@ public:
virtual ~wxTopLevelWindowPalm(); virtual ~wxTopLevelWindowPalm();
// implement base class pure virtuals // implement base class pure virtuals
virtual void Maximize(bool maximize = TRUE); virtual void Maximize(bool maximize = true);
virtual bool IsMaximized() const; virtual bool IsMaximized() const;
virtual void Iconize(bool iconize = TRUE); virtual void Iconize(bool iconize = true);
virtual bool IsIconized() const; virtual bool IsIconized() const;
virtual void SetIcon(const wxIcon& icon); virtual void SetIcon(const wxIcon& icon);
virtual void SetIcons(const wxIconBundle& icons ); virtual void SetIcons(const wxIconBundle& icons );
@ -75,14 +71,14 @@ public:
virtual bool SetShape(const wxRegion& region); virtual bool SetShape(const wxRegion& region);
#endif // __WXWINCE__ #endif // __WXWINCE__
virtual bool Show(bool show = TRUE); virtual bool Show(bool show = true);
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual bool IsFullScreen() const { return m_fsIsShowing; } virtual bool IsFullScreen() const { return m_fsIsShowing; }
// wxPalm only: EnableCloseButton(FALSE) may be used to remove the "Close" // wxPalm only: EnableCloseButton(false) may be used to remove the "Close"
// button from the title bar // button from the title bar
bool EnableCloseButton(bool enable = TRUE); bool EnableCloseButton(bool enable = true);
// implementation from now on // implementation from now on
// -------------------------- // --------------------------
@ -98,13 +94,13 @@ protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// create a new frame, return FALSE if it couldn't be created // create a new frame, return false if it couldn't be created
bool CreateFrame(const wxString& title, bool CreateFrame(const wxString& title,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size); const wxSize& size);
// create a new dialog using the given dialog template from resources, // create a new dialog using the given dialog template from resources,
// return FALSE if it couldn't be created // return false if it couldn't be created
bool CreateDialog(const void *dlgTemplate, bool CreateDialog(const void *dlgTemplate,
const wxString& title, const wxString& title,
const wxPoint& pos, const wxPoint& pos,

View File

@ -12,11 +12,6 @@
#ifndef _WX_WINDOW_H_ #ifndef _WX_WINDOW_H_
#define _WX_WINDOW_H_ #define _WX_WINDOW_H_
#ifdef __PALMOS__
#include <PalmOS.h>
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// headers // headers
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -336,9 +331,6 @@ public:
#if wxUSE_ACCEL #if wxUSE_ACCEL
bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam); bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam);
#endif #endif
#ifdef __WIN32__
int HandleMenuChar(int chAccel, WXLPARAM lParam);
#endif
bool HandleQueryDragIcon(WXHICON *hIcon); bool HandleQueryDragIcon(WXHICON *hIcon);

View File

@ -1,7 +1,7 @@
#ifndef _WX_PEN_H_BASE_ #ifndef _WX_PEN_H_BASE_
#define _WX_PEN_H_BASE_ #define _WX_PEN_H_BASE_
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/pen.h" #include "wx/palmos/pen.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/pen.h" #include "wx/msw/pen.h"

View File

@ -72,6 +72,27 @@
# endif # endif
#endif #endif
#if defined(__PALMOS__)
# ifndef __WXPALMOS__
# define __WXPALMOS__
# endif
# ifdef __WXMSW__
# undef __WXMSW__
# endif
# ifdef __WINDOWS__
# undef __WINDOWS__
# endif
# ifdef __WIN32__
# undef __WIN32__
# endif
# ifdef WIN32
# undef WIN32
# endif
# ifdef _WIN32
# undef _WIN32
# endif
#endif
#if defined(_WIN64) #if defined(_WIN64)
# ifndef _WIN32 # ifndef _WIN32
/* /*
@ -392,6 +413,17 @@
# endif # endif
# define wxSIZE_T_IS_UINT # define wxSIZE_T_IS_UINT
#elif defined(__PALMOS__)
# ifdef __WIN32__
# error "__WIN32__ should not be defined for PalmOS"
# endif
# ifdef __WINDOWS__
# error "__WINDOWS__ should not be defined for PalmOS"
# endif
# ifdef __WXMSW__
# error "__WXMSW__ should not be defined for PalmOS"
# endif
#else /* Windows */ #else /* Windows */
# ifndef __WINDOWS__ # ifndef __WINDOWS__
# define __WINDOWS__ # define __WINDOWS__
@ -465,7 +497,7 @@
This macro can be used to check that the version of mingw32 compiler is This macro can be used to check that the version of mingw32 compiler is
at least maj.min at least maj.min
*/ */
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
# include "wx/palmos/gccpriv.h" # include "wx/palmos/gccpriv.h"
#elif ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ #elif ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \
defined( __CYGWIN__ ) || \ defined( __CYGWIN__ ) || \

View File

@ -3,7 +3,7 @@
#include "wx/colour.h" #include "wx/colour.h"
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/region.h" #include "wx/palmos/region.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/region.h" #include "wx/msw/region.h"

View File

@ -31,7 +31,7 @@ class WXDLLEXPORT wxWindow;
#include "wx/gdicmn.h" // for wxPoint #include "wx/gdicmn.h" // for wxPoint
// some platforms have their own renderers, others use the generic one // some platforms have their own renderers, others use the generic one
#if (defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK__)) && !defined(__PALMOS__) #if (defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK__)) && !defined(__WXPALMOS__)
#define wxHAS_NATIVE_RENDERER #define wxHAS_NATIVE_RENDERER
#else #else
#undef wxHAS_NATIVE_RENDERER #undef wxHAS_NATIVE_RENDERER

View File

@ -150,7 +150,7 @@ protected:
#define wxStatusBarUniv wxStatusBar #define wxStatusBarUniv wxStatusBar
#include "wx/univ/statusbr.h" #include "wx/univ/statusbr.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#define wxStatusBarPalm wxStatusBar #define wxStatusBarPalm wxStatusBar
#include "wx/palmos/statusbr.h" #include "wx/palmos/statusbr.h"

View File

@ -51,7 +51,7 @@
#include <strings.h> // for strcasecmp() #include <strings.h> // for strcasecmp()
#endif // HAVE_STRCASECMP_IN_STRINGS_H #endif // HAVE_STRCASECMP_IN_STRINGS_H
#ifdef __PALMOS__ #ifdef __WXPALMOS__
#include <StringMgr.h> #include <StringMgr.h>
#endif #endif

View File

@ -41,7 +41,7 @@ private:
// now include the actual class declaration // now include the actual class declaration
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/taskbar.h" #include "wx/palmos/taskbar.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/taskbar.h" #include "wx/msw/taskbar.h"

View File

@ -123,7 +123,7 @@ enum
#else // wxUSE_TOOLBAR_NATIVE #else // wxUSE_TOOLBAR_NATIVE
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/toolbar.h" #include "wx/univ/toolbar.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/toolbar.h" #include "wx/palmos/toolbar.h"
#elif defined(__WXMSW__) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))) #elif defined(__WXMSW__) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__)))
#include "wx/msw/tbar95.h" #include "wx/msw/tbar95.h"

View File

@ -245,7 +245,7 @@ protected:
// include the real class declaration // include the real class declaration
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/toplevel.h" #include "wx/palmos/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowPalm #define wxTopLevelWindowNative wxTopLevelWindowPalm
#elif defined(__WXMSW__) #elif defined(__WXMSW__)

View File

@ -9,7 +9,7 @@
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/generic/treectlg.h" #include "wx/generic/treectlg.h"
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/treectrl.h" #include "wx/palmos/treectrl.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/treectrl.h" #include "wx/msw/treectrl.h"

View File

@ -1317,7 +1317,7 @@ private:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include the declaration of the platform-specific class // include the declaration of the platform-specific class
#if defined(__PALMOS__) #if defined(__WXPALMOS__)
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
#define wxWindowNative wxWindowPalm #define wxWindowNative wxWindowPalm
#else // !wxUniv #else // !wxUniv

View File

@ -118,7 +118,7 @@
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#elif defined(__DMC__) #elif defined(__DMC__)
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) && !defined(__PALMOS__) #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) && !defined(__WXPALMOS__)
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
@ -699,7 +699,7 @@
defined(__EMX__) || defined(__DJGPP__) defined(__EMX__) || defined(__DJGPP__)
#define wxStricmp stricmp #define wxStricmp stricmp
#define wxStrnicmp strnicmp #define wxStrnicmp strnicmp
#elif defined(__PALMOS__) #elif defined(__WXPALMOS__)
/* FIXME: There is no equivalent to strnicmp in the Palm OS API. This /* FIXME: There is no equivalent to strnicmp in the Palm OS API. This
* quick hack should do until one can be written. * quick hack should do until one can be written.
*/ */

View File

@ -43,7 +43,7 @@
#include <signal.h> // for SIGTRAP used by wxTrap() #include <signal.h> // for SIGTRAP used by wxTrap()
#endif //Win/Unix #endif //Win/Unix
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/wrapwin.h" // includes windows.h for MessageBox() #include "wx/msw/wrapwin.h" // includes windows.h for MessageBox()
#endif #endif
@ -140,7 +140,7 @@ bool wxAppConsole::Initialize(int& argc, wxChar **argv)
this->argc = argc; this->argc = argc;
this->argv = argv; this->argv = argv;
#ifndef __PALMOS__ #ifndef __WXPALMOS__
if ( m_appName.empty() && argv ) if ( m_appName.empty() && argv )
{ {
// the application name is, by default, the name of its executable file // the application name is, by default, the name of its executable file

View File

@ -47,7 +47,7 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/ptr_scpd.h" #include "wx/ptr_scpd.h"
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/private.h" // includes windows.h for LOGFONT #include "wx/msw/private.h" // includes windows.h for LOGFONT
#endif #endif

View File

@ -49,7 +49,7 @@
#include "wx/paper.h" #include "wx/paper.h"
#endif // wxUSE_PRINTING_ARCHITECTURE #endif // wxUSE_PRINTING_ARCHITECTURE
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include <windowsx.h> #include <windowsx.h>
#include "wx/msw/private.h" #include "wx/msw/private.h"

View File

@ -291,7 +291,7 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
wxWindow *child = node->GetData(); wxWindow *child = node->GetData();
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
bool is_not_msw_rb = !m_winLastFocused || bool is_not_msw_rb = !m_winLastFocused ||
!wxIsKindOf(m_winLastFocused,wxRadioButton); !wxIsKindOf(m_winLastFocused,wxRadioButton);
#else #else
@ -306,7 +306,7 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
// direction we're coming // direction we're coming
event.SetEventObject(m_winParent); event.SetEventObject(m_winParent);
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
// we need to hop to the next activated // we need to hop to the next activated
// radio button, not just the next radio // radio button, not just the next radio
// button under MSW // button under MSW

View File

@ -36,7 +36,7 @@
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/private.h" // includes windows.h for LOGFONT #include "wx/msw/private.h" // includes windows.h for LOGFONT
#include "wx/msw/winundef.h" #include "wx/msw/winundef.h"
#endif #endif

View File

@ -42,7 +42,7 @@
#include "wx/log.h" #include "wx/log.h"
#include <string.h> #include <string.h>
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif

View File

@ -433,7 +433,7 @@ int wxEntry(int& argc, wxChar **argv)
{ {
#ifdef __WXWINCE__ #ifdef __WXWINCE__
::ExitThread(3); // the same exit code as abort() ::ExitThread(3); // the same exit code as abort()
#elif __PALMOS__ #elif __WXPALMOS__
return -1; return -1;
#else #else
::ExitProcess(3); // the same exit code as abort() ::ExitProcess(3); // the same exit code as abort()

View File

@ -52,7 +52,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
#ifdef __WXMAC__ #ifdef __WXMAC__
@ -118,7 +118,7 @@ void wxMessageOutputDebug::Printf(const wxChar* format, ...)
out.PrintfV(format, args); out.PrintfV(format, args);
va_end(args); va_end(args);
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXMICROWIN__) && !defined(__WXPALMOS__)
out.Replace(wxT("\t"), wxT(" ")); out.Replace(wxT("\t"), wxT(" "));
out.Replace(wxT("\n"), wxT("\r\n")); out.Replace(wxT("\n"), wxT("\r\n"));
::OutputDebugString(out); ::OutputDebugString(out);

View File

@ -43,7 +43,7 @@
// - Mac when compiling with CodeWarrior (__WXMAC__) // - Mac when compiling with CodeWarrior (__WXMAC__)
const wxTextFileType wxTextBuffer::typeDefault = const wxTextFileType wxTextBuffer::typeDefault =
#if defined(__WINDOWS__) || defined(__DOS__) #if defined(__WINDOWS__) || defined(__DOS__) || defined(__PALMOS__)
wxTextFileType_Dos; wxTextFileType_Dos;
#elif defined(__UNIX__) #elif defined(__UNIX__)
wxTextFileType_Unix; wxTextFileType_Unix;
@ -77,7 +77,7 @@ wxString wxTextBuffer::Translate(const wxString& text, wxTextFileType type)
return text; return text;
// nor if it is empty // nor if it is empty
if ( text.IsEmpty() ) if ( text.empty() )
return text; return text;
wxString eol = GetEOL(type), result; wxString eol = GetEOL(type), result;
@ -170,7 +170,7 @@ bool wxTextBuffer::Create(const wxString& strBufferName)
bool wxTextBuffer::Create() bool wxTextBuffer::Create()
{ {
// buffer name must be either given in ctor or in Create(const wxString&) // buffer name must be either given in ctor or in Create(const wxString&)
wxASSERT( !m_strBufferName.IsEmpty() ); wxASSERT( !m_strBufferName.empty() );
// if the buffer already exists do nothing // if the buffer already exists do nothing
if ( Exists() ) return false; if ( Exists() ) return false;
@ -192,7 +192,7 @@ bool wxTextBuffer::Open(const wxString& strBufferName, wxMBConv& conv)
bool wxTextBuffer::Open(wxMBConv& conv) bool wxTextBuffer::Open(wxMBConv& conv)
{ {
// buffer name must be either given in ctor or in Open(const wxString&) // buffer name must be either given in ctor or in Open(const wxString&)
wxASSERT( !m_strBufferName.IsEmpty() ); wxASSERT( !m_strBufferName.empty() );
// open buffer in read-only mode // open buffer in read-only mode
if ( !OnOpen(m_strBufferName, ReadAccess) ) if ( !OnOpen(m_strBufferName, ReadAccess) )

View File

@ -95,7 +95,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#if defined(__WXMSW__) && !defined(__PALMOS__) #if defined(__WXMSW__) && !defined(__WXPALMOS__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
@ -330,10 +330,10 @@ wxString wxGetEmailAddress()
wxString email; wxString email;
wxString host = wxGetFullHostName(); wxString host = wxGetFullHostName();
if ( !host.IsEmpty() ) if ( !host.empty() )
{ {
wxString user = wxGetUserId(); wxString user = wxGetUserId();
if ( !user.IsEmpty() ) if ( !user.empty() )
{ {
email << user << wxT('@') << host; email << user << wxT('@') << host;
} }

View File

@ -20,7 +20,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifndef __PALMOS__ #ifndef __WXPALMOS__
#include "wx/generic/imaglist.h" #include "wx/generic/imaglist.h"
@ -195,4 +195,4 @@ bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y,
return true; return true;
} }
#endif // __PALMOS__ #endif // __WXPALMOS__

View File

@ -17,8 +17,6 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifndef __PALMOS__
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "notebook.h" #pragma implementation "notebook.h"
#endif #endif
@ -34,6 +32,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef __WXPALMOS__
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/settings.h" #include "wx/settings.h"
@ -708,4 +708,4 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
return retval; return retval;
} }
#endif // __PALMOS__ #endif // __WXPALMOS__

View File

@ -127,8 +127,8 @@ wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
info.versionMajor = baseInfo.versionMajor; info.versionMajor = baseInfo.versionMajor;
info.versionMinor = baseInfo.versionMinor; info.versionMinor = baseInfo.versionMinor;
info.os = baseInfo.os; info.os = baseInfo.os;
info.shortName = _T("msw"); info.shortName = _T("palmos");
info.name = _T("wxMSW"); info.name = _T("wxPalmOS");
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
info.shortName << _T("univ"); info.shortName << _T("univ");
info.name << _T("/wxUniversal"); info.name << _T("/wxUniversal");
@ -193,7 +193,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
// to create a window of this class is made. // to create a window of this class is made.
bool wxApp::RegisterWindowClasses() bool wxApp::RegisterWindowClasses()
{ {
return TRUE; return true;
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -202,7 +202,7 @@ bool wxApp::RegisterWindowClasses()
bool wxApp::UnregisterWindowClasses() bool wxApp::UnregisterWindowClasses()
{ {
bool retval = TRUE; bool retval = true;
return retval; return retval;
} }
@ -268,7 +268,7 @@ void wxApp::WakeUpIdle()
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event)) void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))
{ {
if (GetTopWindow()) if (GetTopWindow())
GetTopWindow()->Close(TRUE); GetTopWindow()->Close(true);
} }
// Default behaviour: close the application with prompts. The // Default behaviour: close the application with prompts. The
@ -278,7 +278,7 @@ void wxApp::OnQueryEndSession(wxCloseEvent& event)
if (GetTopWindow()) if (GetTopWindow())
{ {
if (!GetTopWindow()->Close(!event.CanVeto())) if (!GetTopWindow()->Close(!event.CanVeto()))
event.Veto(TRUE); event.Veto(true);
} }
} }

View File

@ -166,7 +166,7 @@ wxBitmapRefData::wxBitmapRefData()
#endif #endif
m_isDIB = m_isDIB =
m_hasAlpha = FALSE; m_hasAlpha = false;
} }
void wxBitmapRefData::Free() void wxBitmapRefData::Free()
@ -187,30 +187,21 @@ wxGDIImageRefData *wxBitmap::CreateData() const
return NULL; return NULL;
} }
#ifdef __WIN32__
bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
{
return FALSE;
}
#endif // Win32
bool wxBitmap::CopyFromCursor(const wxCursor& cursor) bool wxBitmap::CopyFromCursor(const wxCursor& cursor)
{ {
return FALSE; return false;
} }
bool wxBitmap::CopyFromIcon(const wxIcon& icon) bool wxBitmap::CopyFromIcon(const wxIcon& icon)
{ {
return FALSE; return false;
} }
#ifndef NEVER_USE_DIB #ifndef NEVER_USE_DIB
bool wxBitmap::CopyFromDIB(const wxDIB& dib) bool wxBitmap::CopyFromDIB(const wxDIB& dib)
{ {
return FALSE: return false:
} }
#endif // NEVER_USE_DIB #endif // NEVER_USE_DIB
@ -231,7 +222,7 @@ bool wxBitmap::CreateFromXpm(const char **data)
bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data)) bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data))
#endif #endif
{ {
return FALSE; return false;
} }
wxBitmap::wxBitmap(int w, int h, int d) wxBitmap::wxBitmap(int w, int h, int d)
@ -252,17 +243,17 @@ wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type)
bool wxBitmap::Create(int width, int height, int depth) bool wxBitmap::Create(int width, int height, int depth)
{ {
return FALSE; return false;
} }
bool wxBitmap::Create(int width, int height, const wxDC& dc) bool wxBitmap::Create(int width, int height, const wxDC& dc)
{ {
return FALSE; return false;
} }
bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc) bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
{ {
return FALSE; return false;
} }
#if wxUSE_IMAGE #if wxUSE_IMAGE
@ -275,17 +266,17 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
bool wxBitmap::CreateFromImage(const wxImage& image, int depth) bool wxBitmap::CreateFromImage(const wxImage& image, int depth)
{ {
return FALSE; return false;
} }
bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc) bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc)
{ {
return FALSE; return false;
} }
bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc) bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
{ {
return FALSE; return false;
} }
wxImage wxBitmap::ConvertToImage() const wxImage wxBitmap::ConvertToImage() const
@ -304,19 +295,19 @@ wxImage wxBitmap::ConvertToImage() const
bool wxBitmap::LoadFile(const wxString& filename, long type) bool wxBitmap::LoadFile(const wxString& filename, long type)
{ {
return FALSE; return false;
} }
bool wxBitmap::Create(void *data, long type, int width, int height, int depth) bool wxBitmap::Create(void *data, long type, int width, int height, int depth)
{ {
return FALSE; return false;
} }
bool wxBitmap::SaveFile(const wxString& filename, bool wxBitmap::SaveFile(const wxString& filename,
int type, int type,
const wxPalette *palette) const wxPalette *palette)
{ {
return FALSE; return false;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -369,7 +360,7 @@ void wxBitmap::UseAlpha()
bool wxBitmap::HasAlpha() const bool wxBitmap::HasAlpha() const
{ {
return FALSE; return false;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -453,21 +444,21 @@ wxMask::~wxMask()
// Create a mask from a mono bitmap (copies the bitmap). // Create a mask from a mono bitmap (copies the bitmap).
bool wxMask::Create(const wxBitmap& bitmap) bool wxMask::Create(const wxBitmap& bitmap)
{ {
return FALSE; return false;
} }
// Create a mask from a bitmap and a palette index indicating // Create a mask from a bitmap and a palette index indicating
// the transparent area // the transparent area
bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
{ {
return FALSE; return false;
} }
// Create a mask from a bitmap and a colour indicating // Create a mask from a bitmap and a colour indicating
// the transparent area // the transparent area
bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
{ {
return FALSE; return false;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -479,7 +470,7 @@ bool wxBitmapHandler::Create(wxGDIImage *image,
long flags, long flags,
int width, int height, int depth) int width, int height, int depth)
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::Load(wxGDIImage *image, bool wxBitmapHandler::Load(wxGDIImage *image,
@ -487,14 +478,14 @@ bool wxBitmapHandler::Load(wxGDIImage *image,
long flags, long flags,
int width, int height) int width, int height)
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::Save(wxGDIImage *image, bool wxBitmapHandler::Save(wxGDIImage *image,
const wxString& name, const wxString& name,
int type) int type)
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap),
@ -504,7 +495,7 @@ bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(height), int WXUNUSED(height),
int WXUNUSED(depth)) int WXUNUSED(depth))
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap),
@ -513,7 +504,7 @@ bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(desiredWidth), int WXUNUSED(desiredWidth),
int WXUNUSED(desiredHeight)) int WXUNUSED(desiredHeight))
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap),
@ -521,5 +512,5 @@ bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap),
int WXUNUSED(type), int WXUNUSED(type),
const wxPalette *WXUNUSED(palette)) const wxPalette *WXUNUSED(palette))
{ {
return FALSE; return false;
} }

View File

@ -199,50 +199,5 @@ bool wxButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
return false; return false;
} }
// ----------------------------------------------------------------------------
// owner-drawn buttons support
// ----------------------------------------------------------------------------
#ifdef __WIN32__
// drawing helpers
static void DrawButtonText(HDC hdc,
RECT *pRect,
const wxString& text,
COLORREF col)
{
}
static void DrawRect(HDC hdc, const RECT& r)
{
}
void wxButton::MakeOwnerDrawn()
{
}
bool wxButton::SetBackgroundColour(const wxColour &colour)
{
return false;
}
bool wxButton::SetForegroundColour(const wxColour &colour)
{
return false;
}
static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
bool selected, bool pushed)
{
}
bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
{
return true;
}
#endif // __WIN32__
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON

View File

@ -44,7 +44,7 @@ DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED)
// This needs to be written using Palm OS Network API calls, but for now this // This needs to be written using Palm OS Network API calls, but for now this
// will do. // will do.
#if (!defined(__PALMOS__) #if (!defined(__WXPALMOS__)
#include <ras.h> #include <ras.h>
#include <raserror.h> #include <raserror.h>
@ -175,7 +175,7 @@ public:
virtual bool HangUp(); virtual bool HangUp();
virtual bool IsAlwaysOnline() const; virtual bool IsAlwaysOnline() const;
virtual bool IsOnline() const; virtual bool IsOnline() const;
virtual void SetOnlineStatus(bool isOnline = TRUE); virtual void SetOnlineStatus(bool isOnline = true);
virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds); virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds);
virtual void DisableAutoCheckOnlineStatus(); virtual void DisableAutoCheckOnlineStatus();
virtual void SetWellKnownHost(const wxString& hostname, int port); virtual void SetWellKnownHost(const wxString& hostname, int port);
@ -201,7 +201,7 @@ private:
static HRASCONN FindActiveConnection(); static HRASCONN FindActiveConnection();
// notify the application about status change // notify the application about status change
void NotifyApp(bool connected, bool fromOurselves = FALSE) const; void NotifyApp(bool connected, bool fromOurselves = false) const;
// destroy the thread data and the thread itself // destroy the thread data and the thread itself
void CleanUpThreadData(); void CleanUpThreadData();
@ -626,14 +626,14 @@ void wxDialUpManagerMSW::OnDialProgress(RASCONNSTATE rasconnstate,
ms_dialer = NULL; ms_dialer = NULL;
NotifyApp(FALSE /* !connected */, TRUE /* we dialed ourselves */); NotifyApp(false /* !connected */, true /* we dialed ourselves */);
} }
else if ( rasconnstate == RASCS_Connected ) else if ( rasconnstate == RASCS_Connected )
{ {
ms_isConnected = TRUE; ms_isConnected = TRUE;
ms_dialer = NULL; ms_dialer = NULL;
NotifyApp(TRUE /* connected */, TRUE /* we dialed ourselves */); NotifyApp(true /* connected */, true /* we dialed ourselves */);
} }
} }
@ -703,13 +703,13 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
bool async) bool async)
{ {
// check preconditions // check preconditions
wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") );
if ( ms_hRasConnection ) if ( ms_hRasConnection )
{ {
wxFAIL_MSG(wxT("there is already an active connection")); wxFAIL_MSG(wxT("there is already an active connection"));
return TRUE; return true;
} }
// get the default ISP if none given // get the default ISP if none given
@ -724,7 +724,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
// no known ISPs, abort // no known ISPs, abort
wxLogError(_("Failed to connect: no ISP to dial.")); wxLogError(_("Failed to connect: no ISP to dial."));
return FALSE; return false;
case 1: case 1:
// only one ISP, choose it // only one ISP, choose it
@ -753,7 +753,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
if ( !entryName ) if ( !entryName )
{ {
// cancelled by user // cancelled by user
return FALSE; return false;
} }
} }
} }
@ -778,7 +778,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
{ {
wxLogError(_("Failed to connect: missing username/password.")); wxLogError(_("Failed to connect: missing username/password."));
return FALSE; return false;
} }
} }
else else
@ -849,7 +849,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
ms_dialer = NULL; ms_dialer = NULL;
return FALSE; return false;
} }
// for async dialing, we're not yet connected // for async dialing, we're not yet connected
@ -858,7 +858,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
ms_isConnected = TRUE; ms_isConnected = TRUE;
} }
return TRUE; return true;
} }
bool wxDialUpManagerMSW::IsDialing() const bool wxDialUpManagerMSW::IsDialing() const
@ -871,7 +871,7 @@ bool wxDialUpManagerMSW::CancelDialing()
if ( !GetDialer() ) if ( !GetDialer() )
{ {
// silently ignore // silently ignore
return FALSE; return false;
} }
wxASSERT_MSG( ms_hRasConnection, wxT("dialing but no connection?") ); wxASSERT_MSG( ms_hRasConnection, wxT("dialing but no connection?") );
@ -883,7 +883,7 @@ bool wxDialUpManagerMSW::CancelDialing()
bool wxDialUpManagerMSW::HangUp() bool wxDialUpManagerMSW::HangUp()
{ {
wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") );
// we may terminate either the connection we initiated or another one which // we may terminate either the connection we initiated or another one which
// is active now // is active now
@ -903,7 +903,7 @@ bool wxDialUpManagerMSW::HangUp()
{ {
wxLogError(_("Cannot hang up - no active dialup connection.")); wxLogError(_("Cannot hang up - no active dialup connection."));
return FALSE; return false;
} }
DWORD dwRet = ms_pfnRasHangUp(hRasConn); DWORD dwRet = ms_pfnRasHangUp(hRasConn);
@ -915,13 +915,13 @@ bool wxDialUpManagerMSW::HangUp()
ms_isConnected = FALSE; ms_isConnected = FALSE;
return TRUE; return true;
} }
bool wxDialUpManagerMSW::IsAlwaysOnline() const bool wxDialUpManagerMSW::IsAlwaysOnline() const
{ {
// assume no permanent connection by default // assume no permanent connection by default
bool isAlwaysOnline = FALSE; bool isAlwaysOnline = false;
// try to use WinInet functions // try to use WinInet functions
@ -958,7 +958,7 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const
bool wxDialUpManagerMSW::IsOnline() const bool wxDialUpManagerMSW::IsOnline() const
{ {
wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") );
if ( IsAlwaysOnline() ) if ( IsAlwaysOnline() )
{ {
@ -973,7 +973,7 @@ bool wxDialUpManagerMSW::IsOnline() const
} }
else else
{ {
// return TRUE if there is at least one active connection // return true if there is at least one active connection
return FindActiveConnection() != 0; return FindActiveConnection() != 0;
} }
} }
@ -987,12 +987,12 @@ void wxDialUpManagerMSW::SetOnlineStatus(bool isOnline)
bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
{ {
wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); wxCHECK_MSG( IsOk(), false, wxT("using uninitialized wxDialUpManager") );
if ( m_autoCheckLevel++ ) if ( m_autoCheckLevel++ )
{ {
// already checking // already checking
return TRUE; return true;
} }
bool ok = ms_pfnRasConnectionNotification != 0; bool ok = ms_pfnRasConnectionNotification != 0;
@ -1006,12 +1006,12 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
if ( m_hThread != 0 ) if ( m_hThread != 0 )
{ {
if ( ::ResumeThread(m_hThread) != (DWORD)-1 ) if ( ::ResumeThread(m_hThread) != (DWORD)-1 )
return TRUE; return true;
// we're leaving a zombie thread... but what else can we do? // we're leaving a zombie thread... but what else can we do?
wxLogLastError(wxT("ResumeThread(RasThread)")); wxLogLastError(wxT("ResumeThread(RasThread)"));
ok = FALSE; ok = false;
} }
} }
@ -1032,7 +1032,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
{ {
wxLogLastError(wxT("CreateEvent(RasStatus)")); wxLogLastError(wxT("CreateEvent(RasStatus)"));
ok = FALSE; ok = false;
} }
} }
@ -1055,7 +1055,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
CleanUpThreadData(); CleanUpThreadData();
ok = FALSE; ok = false;
} }
} }
@ -1074,7 +1074,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
CleanUpThreadData(); CleanUpThreadData();
ok = FALSE; ok = false;
} }
// and subclass it // and subclass it
@ -1126,7 +1126,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
} }
else else
{ {
return TRUE; return true;
} }
} }
@ -1140,7 +1140,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
} }
m_timerStatusPolling.Start(nSeconds * 1000); m_timerStatusPolling.Start(nSeconds * 1000);
return TRUE; return true;
} }
void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus()
@ -1198,7 +1198,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data)
handles[0] = data->hEventRas; handles[0] = data->hEventRas;
handles[1] = data->hEventQuit; handles[1] = data->hEventQuit;
bool cont = TRUE; bool cont = true;
while ( cont ) while ( cont )
{ {
DWORD dwRet = WaitForMultipleObjects(2, handles, FALSE, INFINITE); DWORD dwRet = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
@ -1212,7 +1212,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data)
break; break;
case WAIT_OBJECT_0 + 1: case WAIT_OBJECT_0 + 1:
cont = FALSE; cont = false;
break; break;
default: default:
@ -1284,7 +1284,7 @@ static void WINAPI wxRasDialFunc(UINT WXUNUSED(unMsg),
rasconnstate, dwError); rasconnstate, dwError);
} }
#endif // __PALMOS__ #endif // __WXPALMOS__
#endif // wxUSE_DIALUP_MANAGER #endif // wxUSE_DIALUP_MANAGER

View File

@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: palmos/dir.cpp // Name: palmos/dir.cpp
// Purpose: wxDir implementation for Win32 // Purpose: wxDir implementation for PalmOS
// Author: William Osborne // Author: William Osborne
// Modified by: // Modified by:
// Created: 10.13.04 // Created: 10.13.04

View File

@ -103,8 +103,8 @@ public:
// constructors // constructors
wxFontRefData() wxFontRefData()
{ {
Init(-1, wxSize(0, 0), FALSE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, Init(-1, wxSize(0, 0), false, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL, FALSE, wxEmptyString, wxFONTWEIGHT_NORMAL, false, wxEmptyString,
wxFONTENCODING_DEFAULT); wxFONTENCODING_DEFAULT);
} }
@ -218,7 +218,7 @@ public:
else else
{ {
m_pointSize = pointSize; m_pointSize = pointSize;
m_sizeUsingPixels = FALSE; m_sizeUsingPixels = false;
} }
} }
@ -231,7 +231,7 @@ public:
else else
{ {
m_pixelSize = pixelSize; m_pixelSize = pixelSize;
m_sizeUsingPixels = TRUE; m_sizeUsingPixels = true;
} }
} }
@ -420,11 +420,6 @@ WXHANDLE wxFont::GetResourceHandle() const
return (WXHANDLE)0; return (WXHANDLE)0;
} }
WXHFONT wxFont::GetHFONT() const
{
return 0;
}
bool wxFont::IsFree() const bool wxFont::IsFree() const
{ {
return false; return false;

View File

@ -21,12 +21,6 @@
#endif #endif
#include "wx/string.h" #include "wx/string.h"
#include "wx/window.h"
#if !defined(__WIN32__) && !defined(_MMRESULT_)
typedef UINT MMRESULT;
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/palmos/joystick.h" #include "wx/palmos/joystick.h"

View File

@ -45,10 +45,7 @@
// other standard headers // other standard headers
#include <string.h> #include <string.h>
#ifdef __PALMOS__ #include <Menu.h>
#include <PalmOS.h>
#include <Menu.h>
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// global variables // global variables
@ -210,7 +207,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
GetMenuBar()->Refresh(); GetMenuBar()->Refresh();
} }
return TRUE; return true;
} }
void wxMenu::EndRadioGroup() void wxMenu::EndRadioGroup()
@ -426,7 +423,7 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{ {
if ( !wxMenuBarBase::Insert(pos, menu, title) ) if ( !wxMenuBarBase::Insert(pos, menu, title) )
return FALSE; return false;
m_titles.Insert(wxStripMenuCodes(title), pos); m_titles.Insert(wxStripMenuCodes(title), pos);
@ -436,13 +433,13 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
Refresh(); Refresh();
} }
return TRUE; return true;
} }
bool wxMenuBar::Append(wxMenu *menu, const wxString& title) bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
{ {
if ( !wxMenuBarBase::Append(menu, title) ) if ( !wxMenuBarBase::Append(menu, title) )
return FALSE; return false;
m_titles.Add(wxStripMenuCodes(title)); m_titles.Add(wxStripMenuCodes(title));
@ -452,7 +449,7 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
Refresh(); Refresh();
} }
return TRUE; return true;
} }
wxMenu *wxMenuBar::Remove(size_t pos) wxMenu *wxMenuBar::Remove(size_t pos)
@ -662,13 +659,6 @@ void wxMenuBar::Attach(wxFrame *frame)
LoadMenu(); LoadMenu();
} }
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))
bool wxMenuBar::AddAdornments(long style)
{
return false;
}
#endif
void wxMenuBar::Detach() void wxMenuBar::Detach()
{ {
wxMenuBarBase::Detach(); wxMenuBarBase::Detach();

View File

@ -143,24 +143,6 @@ void wxMetafileDC::SetMapMode(int mode)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxMakeMetafilePlaceable // wxMakeMetafilePlaceable
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __WIN32__
struct RECT32
{
short left;
short top;
short right;
short bottom;
};
struct mfPLACEABLEHEADER {
DWORD key;
short hmf;
RECT32 bbox;
WORD inch;
DWORD reserved;
WORD checksum;
};
#else
struct mfPLACEABLEHEADER { struct mfPLACEABLEHEADER {
DWORD key; DWORD key;
HANDLE hmf; HANDLE hmf;
@ -169,7 +151,6 @@ struct mfPLACEABLEHEADER {
DWORD reserved; DWORD reserved;
WORD checksum; WORD checksum;
}; };
#endif
/* /*
* Pass filename of existing non-placeable metafile, and bounding box. * Pass filename of existing non-placeable metafile, and bounding box.

View File

@ -21,7 +21,7 @@
#endif #endif
// This really doesn't apply to Palm OS // This really doesn't apply to Palm OS
#ifdef __PALMOS__ #ifdef __WXPALMOS__
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
@ -40,11 +40,6 @@
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#ifdef __WXMSW__
#include "wx/palmos/registry.h"
#include "wx/palmos/private.h"
#endif // OS
#include "wx/palmos/mimetype.h" #include "wx/palmos/mimetype.h"
// other standard headers // other standard headers
@ -107,7 +102,7 @@ static bool CanonicalizeParams(wxString& command)
void wxFileTypeImpl::Init(const wxString& strFileType, const wxString& ext) void wxFileTypeImpl::Init(const wxString& strFileType, const wxString& ext)
{ {
// VZ: does it? (FIXME) // VZ: does it? (FIXME)
wxCHECK_RET( !ext.IsEmpty(), _T("needs an extension") ); wxCHECK_RET( !ext.empty(), _T("needs an extension") );
if ( ext[0u] != wxT('.') ) { if ( ext[0u] != wxT('.') ) {
m_ext = wxT('.'); m_ext = wxT('.');
@ -131,9 +126,9 @@ size_t wxFileTypeImpl::GetAllCommands(wxArrayString *verbs,
wxArrayString *commands, wxArrayString *commands,
const wxFileType::MessageParameters& params) const const wxFileType::MessageParameters& params) const
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), 0, _T("GetAllCommands() needs an extension") ); wxCHECK_MSG( !m_ext.empty(), 0, _T("GetAllCommands() needs an extension") );
if ( m_strFileType.IsEmpty() ) if ( m_strFileType.empty() )
{ {
// get it from the registry // get it from the registry
wxFileTypeImpl *self = wxConstCast(this, wxFileTypeImpl); wxFileTypeImpl *self = wxConstCast(this, wxFileTypeImpl);
@ -195,11 +190,11 @@ bool wxFileTypeImpl::EnsureExtKeyExists()
{ {
wxLogError(_("Failed to create registry entry for '%s' files."), wxLogError(_("Failed to create registry entry for '%s' files."),
m_ext.c_str()); m_ext.c_str());
return FALSE; return false;
} }
} }
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -284,7 +279,7 @@ wxFileTypeImpl::GetOpenCommand(wxString *openCmd,
*openCmd = wxFileType::ExpandCommand(cmd, params); *openCmd = wxFileType::ExpandCommand(cmd, params);
return !openCmd->IsEmpty(); return !openCmd->empty();
} }
bool bool
@ -296,7 +291,7 @@ wxFileTypeImpl::GetPrintCommand(wxString *printCmd,
*printCmd = wxFileType::ExpandCommand(cmd, params); *printCmd = wxFileType::ExpandCommand(cmd, params);
return !printCmd->IsEmpty(); return !printCmd->empty();
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -306,17 +301,17 @@ wxFileTypeImpl::GetPrintCommand(wxString *printCmd,
// TODO this function is half implemented // TODO this function is half implemented
bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions) bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
{ {
if ( m_ext.IsEmpty() ) { if ( m_ext.empty() ) {
// the only way to get the list of extensions from the file type is to // the only way to get the list of extensions from the file type is to
// scan through all extensions in the registry - too slow... // scan through all extensions in the registry - too slow...
return FALSE; return false;
} }
else { else {
extensions.Empty(); extensions.Empty();
extensions.Add(m_ext); extensions.Add(m_ext);
// it's a lie too, we don't return _all_ extensions... // it's a lie too, we don't return _all_ extensions...
return TRUE; return true;
} }
} }
@ -336,12 +331,12 @@ bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
if ( !GetMimeType(&s) ) if ( !GetMimeType(&s) )
{ {
return FALSE; return false;
} }
mimeTypes.Clear(); mimeTypes.Clear();
mimeTypes.Add(s); mimeTypes.Add(s);
return TRUE; return true;
} }
@ -366,7 +361,7 @@ bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const
// index may be omitted, in which case BeforeLast(',') is empty and // index may be omitted, in which case BeforeLast(',') is empty and
// AfterLast(',') is the whole string // AfterLast(',') is the whole string
if ( strFullPath.IsEmpty() ) { if ( strFullPath.empty() ) {
strFullPath = strIndex; strFullPath = strIndex;
strIndex = wxT("0"); strIndex = wxT("0");
} }
@ -378,12 +373,12 @@ bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const
iconLoc->SetIndex(wxAtoi(strIndex)); iconLoc->SetIndex(wxAtoi(strIndex));
} }
return TRUE; return true;
} }
} }
// no such file type or no value or incorrect icon entry // no such file type or no value or incorrect icon entry
return FALSE; return false;
} }
bool wxFileTypeImpl::GetDescription(wxString *desc) const bool wxFileTypeImpl::GetDescription(wxString *desc) const
@ -395,11 +390,11 @@ bool wxFileTypeImpl::GetDescription(wxString *desc) const
if ( key.Open(wxRegKey::Read) ) { if ( key.Open(wxRegKey::Read) ) {
// it's the default value of the key // it's the default value of the key
if ( key.QueryValue(wxEmptyString, *desc) ) { if ( key.QueryValue(wxEmptyString, *desc) ) {
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
// helper function // helper function
@ -425,7 +420,7 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext)
// suppress possible error messages // suppress possible error messages
wxLogNull nolog; wxLogNull nolog;
bool knownExtension = FALSE; bool knownExtension = false;
wxString strFileType; wxString strFileType;
wxRegKey key(wxRegKey::HKCR, str); wxRegKey key(wxRegKey::HKCR, str);
@ -439,7 +434,7 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext)
// this extension doesn't have a filetype, but it's known to the // this extension doesn't have a filetype, but it's known to the
// system and may be has some other useful keys (open command or // system and may be has some other useful keys (open command or
// content-type), so still return a file type object for it // content-type), so still return a file type object for it
knownExtension = TRUE; knownExtension = true;
} }
} }
@ -654,11 +649,11 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd,
const wxString& verb, const wxString& verb,
bool WXUNUSED(overwriteprompt)) bool WXUNUSED(overwriteprompt))
{ {
wxCHECK_MSG( !m_ext.IsEmpty() && !verb.IsEmpty(), FALSE, wxCHECK_MSG( !m_ext.empty() && !verb.empty(), false,
_T("SetCommand() needs an extension and a verb") ); _T("SetCommand() needs an extension and a verb") );
if ( !EnsureExtKeyExists() ) if ( !EnsureExtKeyExists() )
return FALSE; return false;
wxRegKey rkey(wxRegKey::HKCR, GetVerbPath(verb)); wxRegKey rkey(wxRegKey::HKCR, GetVerbPath(verb));
#if 0 #if 0
@ -683,7 +678,7 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd,
#endif // wxUSE_GUI #endif // wxUSE_GUI
{ {
// cancelled by user // cancelled by user
return FALSE; return false;
} }
} }
#endif #endif
@ -696,10 +691,10 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd,
/* // no longer used /* // no longer used
bool wxFileTypeImpl::SetMimeType(const wxString& mimeTypeOrig) bool wxFileTypeImpl::SetMimeType(const wxString& mimeTypeOrig)
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), FALSE, _T("SetMimeType() needs extension") ); wxCHECK_MSG( !m_ext.empty(), false, _T("SetMimeType() needs extension") );
if ( !EnsureExtKeyExists() ) if ( !EnsureExtKeyExists() )
return FALSE; return false;
// VZ: is this really useful? (FIXME) // VZ: is this really useful? (FIXME)
wxString mimeType; wxString mimeType;
@ -722,13 +717,13 @@ bool wxFileTypeImpl::SetMimeType(const wxString& mimeTypeOrig)
bool wxFileTypeImpl::SetDefaultIcon(const wxString& cmd, int index) bool wxFileTypeImpl::SetDefaultIcon(const wxString& cmd, int index)
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), FALSE, _T("SetDefaultIcon() needs extension") ); wxCHECK_MSG( !m_ext.empty(), false, _T("SetDefaultIcon() needs extension") );
wxCHECK_MSG( !m_strFileType.IsEmpty(), FALSE, _T("File key not found") ); wxCHECK_MSG( !m_strFileType.empty(), false, _T("File key not found") );
// the next line fails on a SMBshare, I think because it is case mangled // the next line fails on a SMBshare, I think because it is case mangled
// wxCHECK_MSG( !wxFileExists(cmd), FALSE, _T("Icon file not found.") ); // wxCHECK_MSG( !wxFileExists(cmd), false, _T("Icon file not found.") );
if ( !EnsureExtKeyExists() ) if ( !EnsureExtKeyExists() )
return FALSE; return false;
wxRegKey rkey(wxRegKey::HKCR, m_strFileType + _T("\\DefaultIcon")); wxRegKey rkey(wxRegKey::HKCR, m_strFileType + _T("\\DefaultIcon"));
@ -739,11 +734,11 @@ bool wxFileTypeImpl::SetDefaultIcon(const wxString& cmd, int index)
bool wxFileTypeImpl::SetDescription (const wxString& desc) bool wxFileTypeImpl::SetDescription (const wxString& desc)
{ {
wxCHECK_MSG( !m_strFileType.IsEmpty(), FALSE, _T("File key not found") ); wxCHECK_MSG( !m_strFileType.empty(), false, _T("File key not found") );
wxCHECK_MSG( !desc.IsEmpty(), FALSE, _T("No file description supplied") ); wxCHECK_MSG( !desc.empty(), false, _T("No file description supplied") );
if ( !EnsureExtKeyExists() ) if ( !EnsureExtKeyExists() )
return FALSE; return false;
wxRegKey rkey(wxRegKey::HKCR, m_strFileType ); wxRegKey rkey(wxRegKey::HKCR, m_strFileType );
@ -757,15 +752,15 @@ bool wxFileTypeImpl::SetDescription (const wxString& desc)
bool wxFileTypeImpl::Unassociate() bool wxFileTypeImpl::Unassociate()
{ {
bool result = TRUE; bool result = true;
if ( !RemoveOpenCommand() ) if ( !RemoveOpenCommand() )
result = FALSE; result = false;
if ( !RemoveDefaultIcon() ) if ( !RemoveDefaultIcon() )
result = FALSE; result = false;
if ( !RemoveMimeType() ) if ( !RemoveMimeType() )
result = FALSE; result = false;
if ( !RemoveDescription() ) if ( !RemoveDescription() )
result = FALSE; result = false;
/* /*
//this might hold other keys, eg some have CSLID keys //this might hold other keys, eg some have CSLID keys
@ -787,7 +782,7 @@ bool wxFileTypeImpl::RemoveOpenCommand()
bool wxFileTypeImpl::RemoveCommand(const wxString& verb) bool wxFileTypeImpl::RemoveCommand(const wxString& verb)
{ {
wxCHECK_MSG( !m_ext.IsEmpty() && !verb.IsEmpty(), FALSE, wxCHECK_MSG( !m_ext.empty() && !verb.empty(), false,
_T("RemoveCommand() needs an extension and a verb") ); _T("RemoveCommand() needs an extension and a verb") );
wxString sKey = m_strFileType; wxString sKey = m_strFileType;
@ -799,7 +794,7 @@ bool wxFileTypeImpl::RemoveCommand(const wxString& verb)
bool wxFileTypeImpl::RemoveMimeType() bool wxFileTypeImpl::RemoveMimeType()
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), FALSE, _T("RemoveMimeType() needs extension") ); wxCHECK_MSG( !m_ext.empty(), false, _T("RemoveMimeType() needs extension") );
wxRegKey rkey(wxRegKey::HKCR, m_ext); wxRegKey rkey(wxRegKey::HKCR, m_ext);
return !rkey.Exists() || rkey.DeleteSelf(); return !rkey.Exists() || rkey.DeleteSelf();
@ -807,7 +802,7 @@ bool wxFileTypeImpl::RemoveMimeType()
bool wxFileTypeImpl::RemoveDefaultIcon() bool wxFileTypeImpl::RemoveDefaultIcon()
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), FALSE, wxCHECK_MSG( !m_ext.empty(), false,
_T("RemoveDefaultIcon() needs extension") ); _T("RemoveDefaultIcon() needs extension") );
wxRegKey rkey (wxRegKey::HKCR, m_strFileType + _T("\\DefaultIcon")); wxRegKey rkey (wxRegKey::HKCR, m_strFileType + _T("\\DefaultIcon"));
@ -816,7 +811,7 @@ bool wxFileTypeImpl::RemoveDefaultIcon()
bool wxFileTypeImpl::RemoveDescription() bool wxFileTypeImpl::RemoveDescription()
{ {
wxCHECK_MSG( !m_ext.IsEmpty(), FALSE, wxCHECK_MSG( !m_ext.empty(), false,
_T("RemoveDescription() needs extension") ); _T("RemoveDescription() needs extension") );
wxRegKey rkey (wxRegKey::HKCR, m_strFileType ); wxRegKey rkey (wxRegKey::HKCR, m_strFileType );
@ -824,4 +819,4 @@ bool wxFileTypeImpl::RemoveDescription()
} }
#endif // wxUSE_MIMETYPE #endif // wxUSE_MIMETYPE
#endif // __PALMOS__ #endif // __WXPALMOS__

View File

@ -18,7 +18,7 @@
// This may or may not apply to Palm OS in the future, but for right now Unicode // This may or may not apply to Palm OS in the future, but for right now Unicode
// is not supported. // is not supported.
#ifndef __PALMOS__ #ifndef __WXPALMOS__
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
@ -153,59 +153,8 @@ WXDLLEXPORT int wxMSLU__tremove(const wxChar *name)
return _tremove(name); return _tremove(name);
} }
#if defined( __VISUALC__ ) \
|| ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
|| ( defined(__MWERKS__) && defined(__WXMSW__) ) \
|| ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) )
WXDLLEXPORT int wxMSLU__wopen(const wxChar *name, int flags, int mode)
{
if ( wxUsingUnicowsDll() )
#ifdef __BORLANDC__
return open(wxConvFile.cWX2MB(name), flags, mode);
#else
return _open(wxConvFile.cWX2MB(name), flags, mode);
#endif
else
return _wopen(name, flags, mode);
}
WXDLLEXPORT int wxMSLU__waccess(const wxChar *name, int mode)
{
if ( wxUsingUnicowsDll() )
return _access(wxConvFile.cWX2MB(name), mode);
else
return _waccess(name, mode);
}
WXDLLEXPORT int wxMSLU__wmkdir(const wxChar *name)
{
if ( wxUsingUnicowsDll() )
return _mkdir(wxConvFile.cWX2MB(name));
else
return _wmkdir(name);
}
WXDLLEXPORT int wxMSLU__wrmdir(const wxChar *name)
{
if ( wxUsingUnicowsDll() )
return _rmdir(wxConvFile.cWX2MB(name));
else
return _wrmdir(name);
}
WXDLLEXPORT int wxMSLU__wstat(const wxChar *name, struct _stat *buffer)
{
if ( wxUsingUnicowsDll() )
return _stat((const char*)wxConvFile.cWX2MB(name), buffer);
else
return _wstat(name, buffer);
}
#endif // compilers having wopen() &c
#endif // wxUSE_BASE #endif // wxUSE_BASE
#endif // wxUSE_UNICODE_MSLU #endif // wxUSE_UNICODE_MSLU
#endif // __PALMOS__ #endif // __WXPALMOS__

View File

@ -44,21 +44,6 @@ public:
virtual bool OnInit() virtual bool OnInit()
{ {
ms_systemMenuFont = new wxFont; ms_systemMenuFont = new wxFont;
#if defined(__WXMSW__) && defined(__WIN32__) && defined(SM_CXMENUCHECK)
NONCLIENTMETRICS nm;
nm.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,0,&nm,0);
ms_systemMenuButtonWidth = nm.iMenuHeight;
ms_systemMenuHeight = nm.iMenuHeight;
// create menu font
wxNativeFontInfo info;
memcpy(&info.lf, &nm.lfMenuFont, sizeof(LOGFONT));
ms_systemMenuFont->Create(info);
#endif
return true; return true;
} }

View File

@ -12,10 +12,6 @@
// - add high level functions (RegisterOleServer, ...) // - add high level functions (RegisterOleServer, ...)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// This really doesn't apply to the Palm OS platform. It would be better to
// support the Palm OS preference database instead.
#ifndef __PALMOS__
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "registry.h" #pragma implementation "registry.h"
#endif #endif
@ -27,6 +23,10 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
// This really doesn't apply to the Palm OS platform. It would be better to
// support the Palm OS preference database instead.
#ifndef __WXPALMOS__
// other wxWidgets headers // other wxWidgets headers
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
@ -122,7 +122,7 @@ wxRegKey::StdKey wxRegKey::ExtractKeyName(wxString& strKey)
} }
else { else {
strKey = strKey.After(REG_SEPARATOR); strKey = strKey.After(REG_SEPARATOR);
if ( !strKey.IsEmpty() && strKey.Last() == REG_SEPARATOR ) if ( !strKey.empty() && strKey.Last() == REG_SEPARATOR )
strKey.Truncate(strKey.Len() - 1); strKey.Truncate(strKey.Len() - 1);
} }
@ -173,8 +173,8 @@ wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey)
: m_strKey(keyParent.m_strKey) : m_strKey(keyParent.m_strKey)
{ {
// combine our name with parent's to get the full name // combine our name with parent's to get the full name
if ( !m_strKey.IsEmpty() && if ( !m_strKey.empty() &&
(strKey.IsEmpty() || strKey[0] != REG_SEPARATOR) ) { (strKey.empty() || strKey[0] != REG_SEPARATOR) ) {
m_strKey += REG_SEPARATOR; m_strKey += REG_SEPARATOR;
} }
@ -229,7 +229,7 @@ void wxRegKey::SetName(const wxRegKey& keyParent, const wxString& strKey)
// next line! // next line!
m_strKey.clear(); m_strKey.clear();
m_strKey += keyParent.m_strKey; m_strKey += keyParent.m_strKey;
if ( !strKey.IsEmpty() && strKey[0] != REG_SEPARATOR ) if ( !strKey.empty() && strKey[0] != REG_SEPARATOR )
m_strKey += REG_SEPARATOR; m_strKey += REG_SEPARATOR;
m_strKey += strKey; m_strKey += strKey;
@ -250,11 +250,11 @@ void wxRegKey::SetHkey(WXHKEY hKey)
// info about the key // info about the key
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// returns TRUE if the key exists // returns true if the key exists
bool wxRegKey::Exists() const bool wxRegKey::Exists() const
{ {
// opened key has to exist, try to open it if not done yet // opened key has to exist, try to open it if not done yet
return IsOpened() ? TRUE : KeyExists(m_hRootKey, m_strKey); return IsOpened() ? true : KeyExists(m_hRootKey, m_strKey);
} }
// returns the full name of the key (prefix is abbreviated if bShortPrefix) // returns the full name of the key (prefix is abbreviated if bShortPrefix)
@ -263,7 +263,7 @@ wxString wxRegKey::GetName(bool bShortPrefix) const
StdKey key = GetStdKeyFromHkey((WXHKEY) m_hRootKey); StdKey key = GetStdKeyFromHkey((WXHKEY) m_hRootKey);
wxString str = bShortPrefix ? aStdKeys[key].szShortName wxString str = bShortPrefix ? aStdKeys[key].szShortName
: aStdKeys[key].szName; : aStdKeys[key].szName;
if ( !m_strKey.IsEmpty() ) if ( !m_strKey.empty() )
str << _T("\\") << m_strKey; str << _T("\\") << m_strKey;
return str; return str;
@ -309,10 +309,10 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
if ( m_dwLastError != ERROR_SUCCESS ) { if ( m_dwLastError != ERROR_SUCCESS ) {
wxLogSysError(m_dwLastError, _("Can't get info about registry key '%s'"), wxLogSysError(m_dwLastError, _("Can't get info about registry key '%s'"),
GetName().c_str()); GetName().c_str());
return FALSE; return false;
} }
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -323,7 +323,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
bool wxRegKey::Open(AccessMode mode) bool wxRegKey::Open(AccessMode mode)
{ {
if ( IsOpened() ) if ( IsOpened() )
return TRUE; return true;
HKEY tmpKey; HKEY tmpKey;
m_dwLastError = ::RegOpenKeyEx m_dwLastError = ::RegOpenKeyEx
@ -339,11 +339,11 @@ bool wxRegKey::Open(AccessMode mode)
{ {
wxLogSysError(m_dwLastError, _("Can't open registry key '%s'"), wxLogSysError(m_dwLastError, _("Can't open registry key '%s'"),
GetName().c_str()); GetName().c_str());
return FALSE; return false;
} }
m_hKey = (WXHKEY) tmpKey; m_hKey = (WXHKEY) tmpKey;
return TRUE; return true;
} }
// creates key, failing if it exists and !bOkIfExists // creates key, failing if it exists and !bOkIfExists
@ -351,10 +351,10 @@ bool wxRegKey::Create(bool bOkIfExists)
{ {
// check for existence only if asked (i.e. order is important!) // check for existence only if asked (i.e. order is important!)
if ( !bOkIfExists && Exists() ) if ( !bOkIfExists && Exists() )
return FALSE; return false;
if ( IsOpened() ) if ( IsOpened() )
return TRUE; return true;
HKEY tmpKey; HKEY tmpKey;
#ifdef __WXWINCE__ #ifdef __WXWINCE__
@ -373,12 +373,12 @@ bool wxRegKey::Create(bool bOkIfExists)
if ( m_dwLastError != ERROR_SUCCESS ) { if ( m_dwLastError != ERROR_SUCCESS ) {
wxLogSysError(m_dwLastError, _("Can't create registry key '%s'"), wxLogSysError(m_dwLastError, _("Can't create registry key '%s'"),
GetName().c_str()); GetName().c_str());
return FALSE; return false;
} }
else else
{ {
m_hKey = (WXHKEY) tmpKey; m_hKey = (WXHKEY) tmpKey;
return TRUE; return true;
} }
} }
@ -393,20 +393,20 @@ bool wxRegKey::Close()
wxLogSysError(m_dwLastError, _("Can't close registry key '%s'"), wxLogSysError(m_dwLastError, _("Can't close registry key '%s'"),
GetName().c_str()); GetName().c_str());
return FALSE; return false;
} }
} }
return TRUE; return true;
} }
bool wxRegKey::RenameValue(const wxChar *szValueOld, const wxChar *szValueNew) bool wxRegKey::RenameValue(const wxChar *szValueOld, const wxChar *szValueNew)
{ {
bool ok = TRUE; bool ok = true;
if ( HasValue(szValueNew) ) { if ( HasValue(szValueNew) ) {
wxLogError(_("Registry value '%s' already exists."), szValueNew); wxLogError(_("Registry value '%s' already exists."), szValueNew);
ok = FALSE; ok = false;
} }
if ( !ok || if ( !ok ||
@ -415,10 +415,10 @@ bool wxRegKey::RenameValue(const wxChar *szValueOld, const wxChar *szValueNew)
wxLogError(_("Failed to rename registry value '%s' to '%s'."), wxLogError(_("Failed to rename registry value '%s' to '%s'."),
szValueOld, szValueNew); szValueOld, szValueNew);
return FALSE; return false;
} }
return TRUE; return true;
} }
bool wxRegKey::CopyValue(const wxChar *szValue, bool wxRegKey::CopyValue(const wxChar *szValue,
@ -450,33 +450,22 @@ bool wxRegKey::CopyValue(const wxChar *szValue,
// exactly they should be copied and because they shouldn't // exactly they should be copied and because they shouldn't
// occur among the application keys (supposedly created with // occur among the application keys (supposedly created with
// this class) // this class)
#ifdef __WIN32__
case Type_None:
case Type_Expand_String:
case Type_Binary:
case Type_Dword_big_endian:
case Type_Link:
case Type_Multi_String:
case Type_Resource_list:
case Type_Full_resource_descriptor:
case Type_Resource_requirements_list:
#endif // Win32
default: default:
wxLogError(_("Can't copy values of unsupported type %d."), wxLogError(_("Can't copy values of unsupported type %d."),
GetValueType(szValue)); GetValueType(szValue));
return FALSE; return false;
} }
} }
bool wxRegKey::Rename(const wxChar *szNewName) bool wxRegKey::Rename(const wxChar *szNewName)
{ {
wxCHECK_MSG( !!m_strKey, FALSE, _T("registry hives can't be renamed") ); wxCHECK_MSG( !!m_strKey, false, _T("registry hives can't be renamed") );
if ( !Exists() ) { if ( !Exists() ) {
wxLogError(_("Registry key '%s' does not exist, cannot rename it."), wxLogError(_("Registry key '%s' does not exist, cannot rename it."),
GetFullName(this)); GetFullName(this));
return FALSE; return false;
} }
// do we stay in the same hive? // do we stay in the same hive?
@ -502,7 +491,7 @@ bool wxRegKey::Rename(const wxChar *szNewName)
keyDst.SetName(szNewName); keyDst.SetName(szNewName);
} }
bool ok = keyDst.Create(FALSE /* fail if alredy exists */); bool ok = keyDst.Create(false /* fail if alredy exists */);
if ( !ok ) { if ( !ok ) {
wxLogError(_("Registry key '%s' already exists."), wxLogError(_("Registry key '%s' already exists."),
GetFullName(&keyDst)); GetFullName(&keyDst));
@ -527,7 +516,7 @@ bool wxRegKey::Copy(const wxChar *szNewName)
{ {
// create the new key first // create the new key first
wxRegKey keyDst(szNewName); wxRegKey keyDst(szNewName);
bool ok = keyDst.Create(FALSE /* fail if alredy exists */); bool ok = keyDst.Create(false /* fail if alredy exists */);
if ( ok ) { if ( ok ) {
ok = Copy(keyDst); ok = Copy(keyDst);
@ -542,7 +531,7 @@ bool wxRegKey::Copy(const wxChar *szNewName)
bool wxRegKey::Copy(wxRegKey& keyDst) bool wxRegKey::Copy(wxRegKey& keyDst)
{ {
bool ok = TRUE; bool ok = true;
// copy all sub keys to the new location // copy all sub keys to the new location
wxString strKey; wxString strKey;
@ -590,19 +579,19 @@ bool wxRegKey::DeleteSelf()
wxLogNull nolog; wxLogNull nolog;
if ( !Open() ) { if ( !Open() ) {
// it already doesn't exist - ok! // it already doesn't exist - ok!
return TRUE; return true;
} }
} }
// prevent a buggy program from erasing one of the root registry keys or an // prevent a buggy program from erasing one of the root registry keys or an
// immediate subkey (i.e. one which doesn't have '\\' inside) of any other // immediate subkey (i.e. one which doesn't have '\\' inside) of any other
// key except HKCR (HKCR has some "deleteable" subkeys) // key except HKCR (HKCR has some "deleteable" subkeys)
if ( m_strKey.IsEmpty() || if ( m_strKey.empty() ||
((m_hRootKey != (WXHKEY) aStdKeys[HKCR].hkey) && ((m_hRootKey != (WXHKEY) aStdKeys[HKCR].hkey) &&
(m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND)) ) { (m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND)) ) {
wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this)); wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this));
return FALSE; return false;
} }
// we can't delete keys while enumerating because it confuses GetNextKey, so // we can't delete keys while enumerating because it confuses GetNextKey, so
@ -622,7 +611,7 @@ bool wxRegKey::DeleteSelf()
for ( size_t nKey = 0; nKey < nKeyCount; nKey++ ) { for ( size_t nKey = 0; nKey < nKeyCount; nKey++ ) {
wxRegKey key(*this, astrSubkeys[nKey]); wxRegKey key(*this, astrSubkeys[nKey]);
if ( !key.DeleteSelf() ) if ( !key.DeleteSelf() )
return FALSE; return false;
} }
// now delete this key itself // now delete this key itself
@ -634,16 +623,16 @@ bool wxRegKey::DeleteSelf()
m_dwLastError != ERROR_FILE_NOT_FOUND ) { m_dwLastError != ERROR_FILE_NOT_FOUND ) {
wxLogSysError(m_dwLastError, _("Can't delete key '%s'"), wxLogSysError(m_dwLastError, _("Can't delete key '%s'"),
GetName().c_str()); GetName().c_str());
return FALSE; return false;
} }
return TRUE; return true;
} }
bool wxRegKey::DeleteKey(const wxChar *szKey) bool wxRegKey::DeleteKey(const wxChar *szKey)
{ {
if ( !Open() ) if ( !Open() )
return FALSE; return false;
wxRegKey key(*this, szKey); wxRegKey key(*this, szKey);
return key.DeleteSelf(); return key.DeleteSelf();
@ -652,7 +641,7 @@ bool wxRegKey::DeleteKey(const wxChar *szKey)
bool wxRegKey::DeleteValue(const wxChar *szValue) bool wxRegKey::DeleteValue(const wxChar *szValue)
{ {
if ( !Open() ) if ( !Open() )
return FALSE; return false;
m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue); m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
@ -661,24 +650,24 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
(m_dwLastError != ERROR_FILE_NOT_FOUND) ) { (m_dwLastError != ERROR_FILE_NOT_FOUND) ) {
wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"), wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"),
szValue, GetName().c_str()); szValue, GetName().c_str());
return FALSE; return false;
} }
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// access to values and subkeys // access to values and subkeys
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// return TRUE if value exists // return true if value exists
bool wxRegKey::HasValue(const wxChar *szValue) const bool wxRegKey::HasValue(const wxChar *szValue) const
{ {
// this function should be silent, so suppress possible messages from Open() // this function should be silent, so suppress possible messages from Open()
wxLogNull nolog; wxLogNull nolog;
if ( !CONST_CAST Open() ) if ( !CONST_CAST Open() )
return FALSE; return false;
LONG dwRet = ::RegQueryValueEx((HKEY) m_hKey, LONG dwRet = ::RegQueryValueEx((HKEY) m_hKey,
WXSTRINGCAST szValue, WXSTRINGCAST szValue,
@ -687,7 +676,7 @@ bool wxRegKey::HasValue(const wxChar *szValue) const
return dwRet == ERROR_SUCCESS; return dwRet == ERROR_SUCCESS;
} }
// returns TRUE if this key has any values // returns true if this key has any values
bool wxRegKey::HasValues() const bool wxRegKey::HasValues() const
{ {
// suppress possible messages from GetFirstValue() // suppress possible messages from GetFirstValue()
@ -699,7 +688,7 @@ bool wxRegKey::HasValues() const
return CONST_CAST GetFirstValue(str, l); return CONST_CAST GetFirstValue(str, l);
} }
// returns TRUE if this key has any subkeys // returns true if this key has any subkeys
bool wxRegKey::HasSubkeys() const bool wxRegKey::HasSubkeys() const
{ {
// suppress possible messages from GetFirstKey() // suppress possible messages from GetFirstKey()
@ -711,14 +700,14 @@ bool wxRegKey::HasSubkeys() const
return CONST_CAST GetFirstKey(str, l); return CONST_CAST GetFirstKey(str, l);
} }
// returns TRUE if given subkey exists // returns true if given subkey exists
bool wxRegKey::HasSubKey(const wxChar *szKey) const bool wxRegKey::HasSubKey(const wxChar *szKey) const
{ {
// this function should be silent, so suppress possible messages from Open() // this function should be silent, so suppress possible messages from Open()
wxLogNull nolog; wxLogNull nolog;
if ( !CONST_CAST Open() ) if ( !CONST_CAST Open() )
return FALSE; return false;
return KeyExists(m_hKey, szKey); return KeyExists(m_hKey, szKey);
} }
@ -740,47 +729,6 @@ wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const
return (ValueType)dwType; return (ValueType)dwType;
} }
#ifdef __WIN32__
bool wxRegKey::SetValue(const wxChar *szValue, long lValue)
{
if ( CONST_CAST Open() ) {
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_DWORD,
(RegString)&lValue, sizeof(lValue));
if ( m_dwLastError == ERROR_SUCCESS )
return TRUE;
}
wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
GetFullName(this, szValue));
return FALSE;
}
bool wxRegKey::QueryValue(const wxChar *szValue, long *plValue) const
{
if ( CONST_CAST Open() ) {
DWORD dwType, dwSize = sizeof(DWORD);
RegString pBuf = (RegString)plValue;
m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED,
&dwType, pBuf, &dwSize);
if ( m_dwLastError != ERROR_SUCCESS ) {
wxLogSysError(m_dwLastError, _("Can't read value of key '%s'"),
GetName().c_str());
return FALSE;
}
else {
// check that we read the value of right type
wxASSERT_MSG( IsNumericValue(szValue),
wxT("Type mismatch in wxRegKey::QueryValue().") );
return TRUE;
}
}
else
return FALSE;
}
#endif //Win32
bool wxRegKey::QueryValue(const wxChar *szValue, bool wxRegKey::QueryValue(const wxChar *szValue,
wxString& strValue, wxString& strValue,
bool raw) const bool raw) const
@ -837,14 +785,14 @@ bool wxRegKey::QueryValue(const wxChar *szValue,
wxASSERT_MSG( !IsNumericValue(szValue), wxASSERT_MSG( !IsNumericValue(szValue),
wxT("Type mismatch in wxRegKey::QueryValue().") ); wxT("Type mismatch in wxRegKey::QueryValue().") );
return TRUE; return true;
} }
} }
} }
wxLogSysError(m_dwLastError, _("Can't read value of '%s'"), wxLogSysError(m_dwLastError, _("Can't read value of '%s'"),
GetFullName(this, szValue)); GetFullName(this, szValue));
return FALSE; return false;
} }
bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue) bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue)
@ -854,12 +802,12 @@ bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue)
(RegString)strValue.c_str(), (RegString)strValue.c_str(),
(strValue.Len() + 1)*sizeof(wxChar)); (strValue.Len() + 1)*sizeof(wxChar));
if ( m_dwLastError == ERROR_SUCCESS ) if ( m_dwLastError == ERROR_SUCCESS )
return TRUE; return true;
} }
wxLogSysError(m_dwLastError, _("Can't set value of '%s'"), wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
GetFullName(this, szValue)); GetFullName(this, szValue));
return FALSE; return false;
} }
wxString wxRegKey::QueryDefaultValue() const wxString wxRegKey::QueryDefaultValue() const
@ -878,7 +826,7 @@ wxString wxRegKey::QueryDefaultValue() const
bool wxRegKey::GetFirstValue(wxString& strValueName, long& lIndex) bool wxRegKey::GetFirstValue(wxString& strValueName, long& lIndex)
{ {
if ( !Open() ) if ( !Open() )
return FALSE; return false;
lIndex = 0; lIndex = 0;
return GetNextValue(strValueName, lIndex); return GetNextValue(strValueName, lIndex);
@ -890,7 +838,7 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
// are we already at the end of enumeration? // are we already at the end of enumeration?
if ( lIndex == -1 ) if ( lIndex == -1 )
return FALSE; return false;
wxChar szValueName[1024]; // @@ use RegQueryInfoKey... wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
DWORD dwValueLen = WXSIZEOF(szValueName); DWORD dwValueLen = WXSIZEOF(szValueName);
@ -912,18 +860,18 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
GetName().c_str()); GetName().c_str());
} }
return FALSE; return false;
} }
strValueName = szValueName; strValueName = szValueName;
return TRUE; return true;
} }
bool wxRegKey::GetFirstKey(wxString& strKeyName, long& lIndex) bool wxRegKey::GetFirstKey(wxString& strKeyName, long& lIndex)
{ {
if ( !Open() ) if ( !Open() )
return FALSE; return false;
lIndex = 0; lIndex = 0;
return GetNextKey(strKeyName, lIndex); return GetNextKey(strKeyName, lIndex);
@ -935,7 +883,7 @@ bool wxRegKey::GetNextKey(wxString& strKeyName, long& lIndex) const
// are we already at the end of enumeration? // are we already at the end of enumeration?
if ( lIndex == -1 ) if ( lIndex == -1 )
return FALSE; return false;
wxChar szKeyName[_MAX_PATH + 1]; wxChar szKeyName[_MAX_PATH + 1];
@ -957,27 +905,27 @@ bool wxRegKey::GetNextKey(wxString& strKeyName, long& lIndex) const
GetName().c_str()); GetName().c_str());
} }
return FALSE; return false;
} }
strKeyName = szKeyName; strKeyName = szKeyName;
return TRUE; return true;
} }
// returns TRUE if the value contains a number (else it's some string) // returns true if the value contains a number (else it's some string)
bool wxRegKey::IsNumericValue(const wxChar *szValue) const bool wxRegKey::IsNumericValue(const wxChar *szValue) const
{ {
ValueType type = GetValueType(szValue); ValueType type = GetValueType(szValue);
switch ( type ) { switch ( type ) {
case Type_Dword: case Type_Dword:
/* case Type_Dword_little_endian: == Type_Dword */ /* case Type_Dword_little_endian: == Type_Dword */
case Type_Dword_big_endian: case Type_Dword_big_endian:
return TRUE; return true;
default: default:
return FALSE; return false;
}
} }
}
// ============================================================================ // ============================================================================
// implementation of global private functions // implementation of global private functions
@ -987,7 +935,7 @@ bool KeyExists(WXHKEY hRootKey, const wxChar *szKey)
{ {
// don't close this key itself for the case of empty szKey! // don't close this key itself for the case of empty szKey!
if ( wxIsEmpty(szKey) ) if ( wxIsEmpty(szKey) )
return TRUE; return true;
HKEY hkeyDummy; HKEY hkeyDummy;
if ( ::RegOpenKeyEx if ( ::RegOpenKeyEx
@ -1001,10 +949,10 @@ bool KeyExists(WXHKEY hRootKey, const wxChar *szKey)
{ {
::RegCloseKey(hkeyDummy); ::RegCloseKey(hkeyDummy);
return TRUE; return true;
} }
return FALSE; return false;
} }
const wxChar *GetFullName(const wxRegKey *pKey, const wxChar *szValue) const wxChar *GetFullName(const wxRegKey *pKey, const wxChar *szValue)
@ -1019,7 +967,7 @@ const wxChar *GetFullName(const wxRegKey *pKey, const wxChar *szValue)
void RemoveTrailingSeparator(wxString& str) void RemoveTrailingSeparator(wxString& str)
{ {
if ( !str.IsEmpty() && str.Last() == REG_SEPARATOR ) if ( !str.empty() && str.Last() == REG_SEPARATOR )
str.Truncate(str.Len() - 1); str.Truncate(str.Len() - 1);
} }

View File

@ -17,9 +17,6 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Palm OS doesn't really have a theme engine, so this is not needed.
#ifndef __PALMOS__
// for compilers that support precompilation, includes "wx.h". // for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
@ -27,6 +24,9 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
// Palm OS doesn't really have a theme engine, so this is not needed.
#ifndef __WXPALMOS__
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/window.h" #include "wx/window.h"

View File

@ -321,15 +321,6 @@ void wxTextCtrl::Clear()
{ {
} }
#ifdef __WIN32__
bool wxTextCtrl::EmulateKeyPress(const wxKeyEvent& event)
{
return false;
}
#endif // __WIN32__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Clipboard operations // Clipboard operations
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -1042,11 +1042,6 @@ bool wxWindowPalm::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
return false; return false;
} }
int wxWindowPalm::HandleMenuChar(int chAccel, WXLPARAM lParam)
{
return 0;
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// joystick // joystick
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------