From f932daffcb1edacc0c8c0cbba18a1427360236ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 24 Dec 2004 07:41:53 +0000 Subject: [PATCH] wxPalmOS was introduced long after 2.4. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/palmos/app.h | 7 ------- include/wx/palmos/bitmap.h | 7 ------- include/wx/palmos/chkconf.h | 5 ++++- include/wx/palmos/setup0.h | 2 +- include/wx/palmos/taskbar.h | 30 ---------------------------- include/wx/palmos/window.h | 35 --------------------------------- src/palmos/bitmap.cpp | 17 ---------------- src/palmos/taskbar.cpp | 39 ------------------------------------- src/palmos/treectrl.cpp | 35 --------------------------------- 9 files changed, 5 insertions(+), 172 deletions(-) diff --git a/include/wx/palmos/app.h b/include/wx/palmos/app.h index d9527d5771..153d1e6968 100644 --- a/include/wx/palmos/app.h +++ b/include/wx/palmos/app.h @@ -54,13 +54,6 @@ public: virtual bool OnExceptionInMainLoop(); #endif // wxUSE_EXCEPTIONS - // deprecated functions, use wxEventLoop directly instead -#if WXWIN_COMPATIBILITY_2_4 - wxDEPRECATED( void DoMessage(WXMSG *pMsg) ); - wxDEPRECATED( bool DoMessage() ); - wxDEPRECATED( bool ProcessMessage(WXMSG* pMsg) ); -#endif // WXWIN_COMPATIBILITY_2_4 - protected: int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT diff --git a/include/wx/palmos/bitmap.h b/include/wx/palmos/bitmap.h index e51588aee4..f4f92cdc92 100644 --- a/include/wx/palmos/bitmap.h +++ b/include/wx/palmos/bitmap.h @@ -155,13 +155,6 @@ public: bool HasAlpha() const; void UseAlpha(); -#if WXWIN_COMPATIBILITY_2_4 - // these functions do nothing and are only there for backwards - // compatibility - wxDEPRECATED( int GetQuality() const ); - wxDEPRECATED( void SetQuality(int quality) ); -#endif // WXWIN_COMPATIBILITY_2_4 - // implementation only from now on // ------------------------------- diff --git a/include/wx/palmos/chkconf.h b/include/wx/palmos/chkconf.h index d172c90ba6..9f880c25f1 100644 --- a/include/wx/palmos/chkconf.h +++ b/include/wx/palmos/chkconf.h @@ -14,6 +14,10 @@ #ifndef _WX_PALMOS_CHKCONF_H_ #define _WX_PALMOS_CHKCONF_H_ +#if WXWIN_COMPATIBILITY_2_4 + #error "wxPalmOS port was introduced after 2.4.X" +#endif + /* * disable the settings which don't work for some compilers */ @@ -21,7 +25,6 @@ /* * If using PostScript-in-MSW in Univ, must enable PostScript */ - #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT #undef wxUSE_POSTSCRIPT #define wxUSE_POSTSCRIPT 1 diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index a5b7d68066..3f254241d1 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -42,7 +42,7 @@ // in the version after it completely. // // Recommended setting: 0 (please update your code) -#define WXWIN_COMPATIBILITY_2_4 1 +#define WXWIN_COMPATIBILITY_2_4 0 // Set to 0 for accurate dialog units, else 1 to be as per 2.1.16 and before. // If migrating between versions, your dialogs may seem to shrink. diff --git a/include/wx/palmos/taskbar.h b/include/wx/palmos/taskbar.h index e6063d182f..b381f0ea56 100644 --- a/include/wx/palmos/taskbar.h +++ b/include/wx/palmos/taskbar.h @@ -38,19 +38,6 @@ public: bool RemoveIcon(void); bool PopupMenu(wxMenu *menu); //, int x, int y); -#if WXWIN_COMPATIBILITY_2_4 - wxDEPRECATED( bool IsOK() const ); - -// Overridables - virtual void OnMouseMove(wxEvent&); - virtual void OnLButtonDown(wxEvent&); - virtual void OnLButtonUp(wxEvent&); - virtual void OnRButtonDown(wxEvent&); - virtual void OnRButtonUp(wxEvent&); - virtual void OnLButtonDClick(wxEvent&); - virtual void OnRButtonDClick(wxEvent&); -#endif - // Implementation protected: friend class wxTaskBarIconWindow; @@ -63,24 +50,7 @@ protected: bool m_iconAdded; wxIcon m_icon; wxString m_strTooltip; - -#if WXWIN_COMPATIBILITY_2_4 - // non-virtual default event handlers to forward events to the virtuals - void _OnMouseMove(wxTaskBarIconEvent&); - void _OnLButtonDown(wxTaskBarIconEvent&); - void _OnLButtonUp(wxTaskBarIconEvent&); - void _OnRButtonDown(wxTaskBarIconEvent&); - void _OnRButtonUp(wxTaskBarIconEvent&); - void _OnLButtonDClick(wxTaskBarIconEvent&); - void _OnRButtonDClick(wxTaskBarIconEvent&); - - DECLARE_EVENT_TABLE() -#endif }; -#if WXWIN_COMPATIBILITY_2_4 -inline bool wxTaskBarIcon::IsOK() const { return IsOk(); } -#endif - #endif // _TASKBAR_H_ diff --git a/include/wx/palmos/window.h b/include/wx/palmos/window.h index 230bcbdff2..636b7bc66e 100644 --- a/include/wx/palmos/window.h +++ b/include/wx/palmos/window.h @@ -27,19 +27,6 @@ // a better solution should be found later... #define wxUSE_MOUSEEVENT_HACK 0 -// --------------------------------------------------------------------------- -// constants -// --------------------------------------------------------------------------- - -#if WXWIN_COMPATIBILITY_2_4 -// they're unused by wxWidgets... -enum -{ - wxKEY_SHIFT = 1, - wxKEY_CTRL = 2 -}; -#endif - // --------------------------------------------------------------------------- // wxWindow declaration for Palm // --------------------------------------------------------------------------- @@ -128,12 +115,6 @@ public: // Accept files for dragging virtual void DragAcceptFiles(bool accept); -#if WXWIN_COMPATIBILITY_2_4 - wxDEPRECATED( bool GetUseCtl3D() const ); - wxDEPRECATED( bool GetTransparentBackground() const ); - wxDEPRECATED( void SetTransparent(bool t = true) ); -#endif // WXWIN_COMPATIBILITY_2_4 - #ifndef __WXUNIVERSAL__ // Native resource loading (implemented in src/Palm/nativdlg.cpp) // FIXME: should they really be all virtual? @@ -465,18 +446,6 @@ private: DECLARE_EVENT_TABLE() }; -// ---------------------------------------------------------------------------- -// inline functions -// ---------------------------------------------------------------------------- - -#if WXWIN_COMPATIBILITY_2_4 - -inline bool wxWindowPalm::GetUseCtl3D() const { return false; } -inline bool wxWindowPalm::GetTransparentBackground() const { return false; } -inline void wxWindowPalm::SetTransparent(bool WXUNUSED(t)) { } - -#endif // WXWIN_COMPATIBILITY_2_4 - // --------------------------------------------------------------------------- // global functions // --------------------------------------------------------------------------- @@ -504,11 +473,7 @@ public: #include "wx/hash.h" // pseudo-template HWND <-> wxWindow hash table -#if WXWIN_COMPATIBILITY_2_4 -WX_DECLARE_HASH(wxWindow, wxWindowList, wxWinHashTable); -#else WX_DECLARE_HASH(wxWindowPalm, wxWindowList, wxWinHashTable); -#endif extern wxWinHashTable *wxWinHandleHash; diff --git a/src/palmos/bitmap.cpp b/src/palmos/bitmap.cpp index 77bf3659f6..201847b839 100644 --- a/src/palmos/bitmap.cpp +++ b/src/palmos/bitmap.cpp @@ -345,15 +345,6 @@ wxDC *wxBitmap::GetSelectedInto() const #endif -#if WXWIN_COMPATIBILITY_2_4 - -int wxBitmap::GetQuality() const -{ - return 0; -} - -#endif // WXWIN_COMPATIBILITY_2_4 - void wxBitmap::UseAlpha() { } @@ -387,14 +378,6 @@ void wxBitmap::SetMask(wxMask *mask) { } -#if WXWIN_COMPATIBILITY_2_4 - -void wxBitmap::SetQuality(int WXUNUSED(quality)) -{ -} - -#endif // WXWIN_COMPATIBILITY_2_4 - // ---------------------------------------------------------------------------- // raw bitmap access support // ---------------------------------------------------------------------------- diff --git a/src/palmos/taskbar.cpp b/src/palmos/taskbar.cpp index 3afea437f8..fe982906d8 100644 --- a/src/palmos/taskbar.cpp +++ b/src/palmos/taskbar.cpp @@ -34,19 +34,6 @@ #include #include "wx/taskbar.h" -#if WXWIN_COMPATIBILITY_2_4 -BEGIN_EVENT_TABLE(wxTaskBarIcon, wxTaskBarIconBase) - EVT_TASKBAR_MOVE (wxTaskBarIcon::_OnMouseMove) - EVT_TASKBAR_LEFT_DOWN (wxTaskBarIcon::_OnLButtonDown) - EVT_TASKBAR_LEFT_UP (wxTaskBarIcon::_OnLButtonUp) - EVT_TASKBAR_RIGHT_DOWN (wxTaskBarIcon::_OnRButtonDown) - EVT_TASKBAR_RIGHT_UP (wxTaskBarIcon::_OnRButtonUp) - EVT_TASKBAR_LEFT_DCLICK (wxTaskBarIcon::_OnLButtonDClick) - EVT_TASKBAR_RIGHT_DCLICK (wxTaskBarIcon::_OnRButtonDClick) -END_EVENT_TABLE() -#endif - - IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) // ============================================================================ @@ -108,32 +95,6 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) return false; } -#if WXWIN_COMPATIBILITY_2_4 -// Overridables -void wxTaskBarIcon::OnMouseMove(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnLButtonDown(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnLButtonUp(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnRButtonDown(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnRButtonUp(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnLButtonDClick(wxEvent& e) { e.Skip(); } -void wxTaskBarIcon::OnRButtonDClick(wxEvent& e) { e.Skip(); } - -void wxTaskBarIcon::_OnMouseMove(wxTaskBarIconEvent& e) - { OnMouseMove(e); } -void wxTaskBarIcon::_OnLButtonDown(wxTaskBarIconEvent& e) - { OnLButtonDown(e); } -void wxTaskBarIcon::_OnLButtonUp(wxTaskBarIconEvent& e) - { OnLButtonUp(e); } -void wxTaskBarIcon::_OnRButtonDown(wxTaskBarIconEvent& e) - { OnRButtonDown(e); } -void wxTaskBarIcon::_OnRButtonUp(wxTaskBarIconEvent& e) - { OnRButtonUp(e); } -void wxTaskBarIcon::_OnLButtonDClick(wxTaskBarIconEvent& e) - { OnLButtonDClick(e); } -void wxTaskBarIcon::_OnRButtonDClick(wxTaskBarIconEvent& e) - { OnRButtonDClick(e); } -#endif - void wxTaskBarIcon::RegisterWindowMessages() { } diff --git a/src/palmos/treectrl.cpp b/src/palmos/treectrl.cpp index f8e143d949..5655c5fd66 100644 --- a/src/palmos/treectrl.cpp +++ b/src/palmos/treectrl.cpp @@ -456,22 +456,6 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& WXUNUSED(item), return 0; } -#if WXWIN_COMPATIBILITY_2_4 - -wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, - long& cookie) const -{ - return 0; -} - -wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& WXUNUSED(item), - long& cookie) const -{ - return 0; -} - -#endif // WXWIN_COMPATIBILITY_2_4 - wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const { return 0; @@ -533,19 +517,6 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent, return 0; } -// for compatibility only -#if WXWIN_COMPATIBILITY_2_4 - -wxTreeItemId wxTreeCtrl::InsertItem(const wxTreeItemId& parent, - const wxString& text, - int image, int selImage, - long insertAfter) -{ - return 0; -} - -#endif // WXWIN_COMPATIBILITY_2_4 - wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, int image, int selectedImage, wxTreeItemData *data) @@ -621,12 +592,6 @@ void wxTreeCtrl::Toggle(const wxTreeItemId& item) { } -#if WXWIN_COMPATIBILITY_2_4 -void wxTreeCtrl::ExpandItem(const wxTreeItemId& item, int action) -{ -} -#endif - void wxTreeCtrl::Unselect() { }