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
This commit is contained in:
Stefan Neis
2003-08-31 20:08:49 +00:00
parent a04be86ee4
commit 0093fe11c5
3 changed files with 2 additions and 82 deletions

View File

@@ -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
//