]> git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/statbox.cpp
making getter const
[wxWidgets.git] / src / mac / carbon / statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbox.cpp
3 // Purpose: wxStaticBox
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "statbox.h"
14 #endif
15
16 #include "wx/defs.h"
17
18 #include "wx/statbox.h"
19 #include "wx/mac/uma.h"
20
21 #if !USE_SHARED_LIBRARY
22 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
23 #endif
24
25 /*
26 * Static box
27 */
28
29 bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
30 const wxString& label,
31 const wxPoint& pos,
32 const wxSize& size,
33 long style,
34 const wxString& name)
35 {
36 m_macIsUserPane = FALSE ;
37
38 if ( !wxControl::Create(parent, id, pos, size,
39 style, wxDefaultValidator, name) )
40 return false;
41
42 m_label = label ;
43
44 Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
45
46 m_peer = new wxMacControl() ;
47 verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") ,
48 true /*primary*/ , m_peer->GetControlRefAddr() ) ) ;
49
50 MacPostControlCreate(pos,size) ;
51
52 return TRUE;
53 }