added GetBorder(flags)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-07-06 21:17:30 +00:00
parent 36b721632e
commit aede4ebb26
2 changed files with 9 additions and 5 deletions

View File

@ -680,9 +680,13 @@ public:
// misc // misc
// ---- // ----
// get the window border style: uses the current style and falls back to // get the window border style from the given flags: this is different from
// the default style for this class otherwise (see GetDefaultBorder()) // simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to
wxBorder GetBorder() const; // translate wxBORDER_DEFAULT to something reasonable
wxBorder GetBorder(long flags) const;
// get border for the flags of this window
wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); }
void UpdateWindowUI(); void UpdateWindowUI();

View File

@ -1994,9 +1994,9 @@ void wxWindowListNode::DeleteData()
// borders // borders
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxBorder wxWindowBase::GetBorder() const wxBorder wxWindowBase::GetBorder(long flags) const
{ {
wxBorder border = (wxBorder)(m_windowStyle & wxBORDER_MASK); wxBorder border = (wxBorder)(flags & wxBORDER_MASK);
if ( border == wxBORDER_DEFAULT ) if ( border == wxBORDER_DEFAULT )
{ {
border = GetDefaultBorder(); border = GetDefaultBorder();