From 9b1414681c6134c9d70b0d9cd58b89b07ae41249 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Wed, 29 Sep 2004 08:03:26 +0000 Subject: [PATCH] Hardware defines spec. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/chkconf.h | 4 +-- include/wx/choice.h | 2 +- include/wx/dirdlg.h | 7 ++++- include/wx/msw/filedlg.h | 4 +-- include/wx/msw/toplevel.h | 12 ++++---- include/wx/msw/wince/choicece.h | 2 +- include/wx/msw/wince/libraries.h | 4 +-- include/wx/msw/wince/smartphone.rc | 2 +- include/wx/msw/wince/textctrlce.h | 2 +- include/wx/platform.h | 44 +++++++++++++++++++----------- include/wx/textctrl.h | 2 +- include/wx/toplevel.h | 7 ++++- 12 files changed, 57 insertions(+), 35 deletions(-) diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 9284420945..5ced93cfef 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -1170,12 +1170,12 @@ #endif /* wxMGL */ /* Hopefully we can emulate these dialogs in due course */ -#ifdef __SMARTPHONE__ +#if defined(__SMARTPHONE__) && defined(__WXWINCE__) # ifdef wxUSE_COLOURDLG # undef wxUSE_COLOURDLG # define wxUSE_COLOURDLG 0 # endif -#endif /* __SMARTPHONE__ */ +#endif /* __SMARTPHONE__ && __WXWINCE__ */ /* generic controls dependencies */ diff --git a/include/wx/choice.h b/include/wx/choice.h index c11aa35550..43c3846744 100644 --- a/include/wx/choice.h +++ b/include/wx/choice.h @@ -67,7 +67,7 @@ private: #if defined(__WXUNIVERSAL__) #include "wx/univ/choice.h" -#elif defined(__SMARTPHONE__) +#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) #include "wx/msw/wince/choicece.h" #elif defined(__WXMSW__) #include "wx/msw/choice.h" diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index bf8053e4e7..d2d38c0bdd 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -44,7 +44,6 @@ public: // Universal and non-port related switches with need for generic implementation #if defined(__WXMSW__) && (defined(__WXUNIVERSAL__) || \ - defined(__SMARTPHONE__) || \ defined(__SALFORDC__) || \ !wxUSE_OLE || \ (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)) @@ -52,6 +51,12 @@ public: #include "wx/generic/dirdlgg.h" #define wxDirDialog wxGenericDirDialog +// MS Smartphone +#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) + + #include "wx/generic/dirdlgg.h" + #define wxDirDialog wxGenericDirDialog + // Native MSW #elif defined(__WXMSW__) diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h index 8a8deee9af..5bdd3957fe 100644 --- a/include/wx/msw/filedlg.h +++ b/include/wx/msw/filedlg.h @@ -39,11 +39,11 @@ public: protected: -#ifndef __SMARTPHONE__ +#if !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoGetSize( int *width, int *height ) const; virtual void DoGetPosition( int *x, int *y ) const; -#endif // __SMARTPHONE__ +#endif // !(__SMARTPHONE__ && __WXWINCE__) private: wxArrayString m_fileNames; diff --git a/include/wx/msw/toplevel.h b/include/wx/msw/toplevel.h index c4b7e47287..2033fb0d4e 100644 --- a/include/wx/msw/toplevel.h +++ b/include/wx/msw/toplevel.h @@ -82,11 +82,11 @@ public: void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } wxWindow *GetLastFocus() const { return m_winLastFocused; } -#ifdef __SMARTPHONE__ - void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); - void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); +#if defined(__SMARTPHONE__) && defined(__WXWINCE__) + virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); + virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); -#endif // __SMARTPHONE__ +#endif // __SMARTPHONE__ && __WXWINCE__ protected: // common part of all ctors @@ -130,7 +130,7 @@ protected: // the last focused child: we restore focus to it on activation wxWindow *m_winLastFocused; -#ifdef __SMARTPHONE__ +#if defined(__SMARTPHONE__) && defined(__WXWINCE__) class ButtonMenu { public: @@ -163,7 +163,7 @@ protected: void ReloadButton(ButtonMenu& button, UINT menuID); void ReloadAllButtons(); -#endif // __SMARTPHONE__ +#endif // __SMARTPHONE__ && __WXWINCE__ DECLARE_EVENT_TABLE() DECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW) diff --git a/include/wx/msw/wince/choicece.h b/include/wx/msw/wince/choicece.h index bb893609f3..75aedb775f 100644 --- a/include/wx/msw/wince/choicece.h +++ b/include/wx/msw/wince/choicece.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/msw/wince/choicece.h -// Purpose: wxChoice implementation for Smartphones +// Purpose: wxChoice implementation for smart phones driven by WinCE // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 29.07.2004 diff --git a/include/wx/msw/wince/libraries.h b/include/wx/msw/wince/libraries.h index b03e41a9ba..608b82f9cc 100644 --- a/include/wx/msw/wince/libraries.h +++ b/include/wx/msw/wince/libraries.h @@ -21,7 +21,7 @@ // VC++'s #pragma to link against the libraries conditionally, instead of // including libraries in project files. -#ifdef __VISUALC__ +#if defined(__VISUALC__) && defined(__WXWINCE__) #if _WIN32_WCE >= 400 #pragma comment(lib,"commdlg.lib") @@ -47,6 +47,6 @@ #error "Unknown SDK, please fill-in missing pieces" #endif -#endif // __VISUALC__ +#endif // __VISUALC__ && __WXWINCE__ #endif // _WX_LIBRARIES_H_ diff --git a/include/wx/msw/wince/smartphone.rc b/include/wx/msw/wince/smartphone.rc index 07b39c58ca..3a02755110 100644 --- a/include/wx/msw/wince/smartphone.rc +++ b/include/wx/msw/wince/smartphone.rc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/msw/wince/smartphone.h -// Purpose: resources for Smartphone build +// Purpose: resources for MS Smartphone build // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 01.05.2004 diff --git a/include/wx/msw/wince/textctrlce.h b/include/wx/msw/wince/textctrlce.h index 68741c84c4..c328911a42 100644 --- a/include/wx/msw/wince/textctrlce.h +++ b/include/wx/msw/wince/textctrlce.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/msw/wince/textctrlce.h -// Purpose: wxTextCtrl class - Smartphone implementation +// Purpose: wxTextCtrl implementation for smart phones driven by WinCE // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 30.08.2004 diff --git a/include/wx/platform.h b/include/wx/platform.h index 38415f572e..aed9b04776 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -143,36 +143,45 @@ #endif /* Win32 */ #if defined(__WXMSW__) || defined(__WIN32__) -# if !defined(__WINDOWS__) -# define __WINDOWS__ -# endif +# if !defined(__WINDOWS__) +# define __WINDOWS__ +# endif #endif #ifdef __WINE__ -# ifndef __WIN95__ -# define __WIN95__ -# endif +# ifndef __WIN95__ +# define __WIN95__ +# endif #endif /* WINE */ -/* detect SmartPhone */ +/* detect MS SmartPhone */ #if defined( WIN32_PLATFORM_WFSP ) -# ifndef __SMARTPHONE__ -# define __SMARTPHONE__ -# endif +# ifndef __SMARTPHONE__ +# define __SMARTPHONE__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif #endif /* detect PocketPC */ #if defined( WIN32_PLATFORM_PSPC ) -# ifndef __POCKETPC__ -# define __POCKETPC__ -# endif +# ifndef __POCKETPC__ +# define __POCKETPC__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif #endif /* detect Standard WinCE SDK */ #if defined( WCE_PLATFORM_STANDARDSDK ) -# ifndef __WINCE_STANDARDSDK__ -# define __WINCE_STANDARDSDK__ -# endif +# ifndef __WINCE_STANDARDSDK__ +# define __WINCE_STANDARDSDK__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif #endif #if defined(_WIN32_WCE) && !defined(WIN32_PLATFORM_WFSP) && !defined(WIN32_PLATFORM_PSPC) @@ -185,6 +194,9 @@ # define __HANDHELDPC__ # endif # endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif #endif /* diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 40120e6251..1af64850c2 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -399,7 +399,7 @@ protected: #include "wx/x11/textctrl.h" #elif defined(__WXUNIVERSAL__) #include "wx/univ/textctrl.h" -#elif defined(__SMARTPHONE__) +#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) #include "wx/msw/wince/textctrlce.h" #elif defined(__WXMSW__) #include "wx/msw/textctrl.h" diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index a18741217d..d4337bc783 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -174,11 +174,16 @@ public: // Attracts the users attention to this window if the application is // inactive (should be called when a background event occurs) virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); - + // Is this the active frame (highlighted in the taskbar)? virtual bool IsActive() { return (wxGetTopLevelParent(FindFocus()) == this); } +#if defined(__SMARTPHONE__) + virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; + virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; +#endif // __SMARTPHONE__ + // implementation only from now on // ------------------------------- -- 2.47.2