From 0093fe11c5f581abbc37447b191903e871112f46 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sun, 31 Aug 2003 20:08:49 +0000 Subject: [PATCH] Cleaned up remains of outdated 3D effect handling. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/window.h | 4 --- src/os2/control.cpp | 5 ++- src/os2/window.cpp | 75 ----------------------------------------- 3 files changed, 2 insertions(+), 82 deletions(-) diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index f2a745649d..fed061bb29 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -210,10 +210,6 @@ public: static WXDWORD MakeExtendedStyle( long lStyle ,bool bEliminateBorders = TRUE ); - // Determine whether 3D effects are wanted - WXDWORD Determine3DEffects( WXDWORD dwDefaultBorderStyle - ,bool* pbWant3D - ) const; // PM only: TRUE if this control is part of the main control virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; }; diff --git a/src/os2/control.cpp b/src/os2/control.cpp index d8c0373c11..324ea885b2 100644 --- a/src/os2/control.cpp +++ b/src/os2/control.cpp @@ -99,14 +99,13 @@ bool wxControl::OS2CreateControl( , WXDWORD dwExstyle ) { - bool bWant3D = FALSE; - // // Doesn't do anything at all under OS/2 // if (dwExstyle == (WXDWORD)-1) { - dwExstyle = Determine3DEffects(WS_EX_CLIENTEDGE, &bWant3D); + dwExstyle = 0; + (void) OS2GetStyle(GetWindowStyle(), &dwExstyle); } // // All controls should have these styles (wxWindows creates all controls diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 40aa17e55d..9159d1d295 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -1132,81 +1132,6 @@ WXDWORD wxWindowOS2::MakeExtendedStyle( return dwStyle; } // end of wxWindowOS2::MakeExtendedStyle -// -// Determines whether simulated 3D effects or CTL3D should be used, -// applying a default border style if required, and returning an extended -// style to pass to OS2Create. -// -WXDWORD wxWindowOS2::Determine3DEffects( - WXDWORD dwDefaultBorderStyle -, bool* pbWant3D -) const -{ - WXDWORD dwStyle = 0L; - - // - // Native PM does not have any specialize 3D effects like WIN32 does, - // so we have to try and invent them. - // - - // - // If matches certain criteria, then assume no 3D effects - // unless specifically requested (dealt with in MakeExtendedStyle) - // - if (!GetParent() || - !IsKindOf(CLASSINFO(wxControl)) || - (m_windowStyle & wxNO_BORDER) - ) - { - *pbWant3D = FALSE; - return MakeExtendedStyle(m_windowStyle, FALSE); - } - - // - // 1) App can specify global 3D effects - // - *pbWant3D = wxTheApp->GetAuto3D(); - - // - // 2) If the parent is being drawn with user colours, or simple border - // specified, switch effects off. - // - if (GetParent() && - (GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) || - (m_windowStyle & wxSIMPLE_BORDER) - ) - *pbWant3D = FALSE; - - // - // 3) Control can override this global setting by defining - // a border style, e.g. wxSUNKEN_BORDER - // - if ((m_windowStyle & wxDOUBLE_BORDER) || - (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSTATIC_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) - ) - *pbWant3D = TRUE; - - dwStyle = MakeExtendedStyle( m_windowStyle - ,FALSE - ); - - // - // If we want 3D, but haven't specified a border here, - // apply the default border style specified. - // - if (dwDefaultBorderStyle && (*pbWant3D) && - !((m_windowStyle & wxDOUBLE_BORDER) || - (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSTATIC_BORDER) || - (m_windowStyle & wxSIMPLE_BORDER) - ) - ) - dwStyle |= dwDefaultBorderStyle; - return dwStyle; -} // end of wxWindowOS2::Determine3DEffects - // // Setup background and foreground colours correctly // -- 2.45.2