X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16cba29d3a5a0a95b367382311a4a7a9a9833210..58385af01650f2218cff7d64b58140a8aafdf8e0:/include/wx/statbox.h diff --git a/include/wx/statbox.h b/include/wx/statbox.h index 78690c41a0..41d29b05b9 100644 --- a/include/wx/statbox.h +++ b/include/wx/statbox.h @@ -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) };