extracted platform-specific code to determine static box borders to wxStaticBox::GetBordersForSizer()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-03-07 23:37:15 +00:00
parent 7e75449835
commit 5dd070c25b
5 changed files with 50 additions and 51 deletions

View File

@@ -20,6 +20,19 @@ public:
virtual bool AcceptsFocus() const { return false; }
virtual bool HasTransparentBackground() { return true; }
// implementation only: this is used by wxStaticBoxSizer to account for the
// need for extra space taken by the static box
//
// the top border is the margin at the top (where the title is),
// borderOther is the margin on all other sides
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const
{
static const int BORDER = 5; // FIXME: hardcoded value
*borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
*borderOther = BORDER;
}
private:
DECLARE_NO_COPY_CLASS(wxStaticBoxBase)
};