]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/statbox_osx.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/statbox_osx.cpp
3 // Purpose: wxStaticBox
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
15 #include "wx/statbox.h"
16 #include "wx/osx/private.h"
18 bool wxStaticBox::Create( wxWindow
*parent
,
20 const wxString
& label
,
24 const wxString
& name
)
28 if ( !wxControl::Create( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
31 m_labelOrig
= m_label
= label
;
33 SetPeer(wxWidgetImpl::CreateGroupBox( this, parent
, id
, label
, pos
, size
, style
, GetExtraStyle() ));
35 MacPostControlCreate( pos
, size
);
40 void wxStaticBox::GetBordersForSizer(int *borderTop
, int *borderOther
) const
42 static int extraTop
= 11;
43 static int other
= 11;
45 *borderTop
= extraTop
;
46 if ( !m_label
.empty() )
51 *borderTop
+= GetCharHeight();
58 bool wxStaticBox::SetFont(const wxFont
& font
)
60 bool retval
= wxWindowBase::SetFont( font
);
62 // dont' update the native control, it has its own small font
67 #endif // wxUSE_STATBOX