X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7360894949ff89740d023dc587be5aa31f5be693..81a3763f803b0d0799b3b1aba73fbb32aa65f9e5:/src/motif/statbox.cpp diff --git a/src/motif/statbox.cpp b/src/motif/statbox.cpp index 0b9ddc67ed..6c96295e52 100644 --- a/src/motif/statbox.cpp +++ b/src/motif/statbox.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "statbox.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -147,3 +143,27 @@ void wxStaticBox::SetLabel( const wxString& label ) sk.Restore(); } + +void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const +{ + Dimension shadow, border; + + XtVaGetValues( (Widget) GetMainWidget(), + XmNshadowThickness, &shadow, + XmNborderWidth, &border, + NULL); + + *borderOther = shadow + border; + + if( GetLabelWidget() ) + { + XtWidgetGeometry preferred; + XtQueryGeometry( (Widget) GetLabelWidget(), NULL, &preferred ); + + *borderTop = preferred.height; + } + else + { + *borderTop = shadow; + } +}