]> git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/statbox.cpp
fixed compilation bug in prior checkin
[wxWidgets.git] / src / mac / classic / 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 #include "wx/defs.h"
13
14 #include "wx/statbox.h"
15 #include "wx/mac/uma.h"
16
17 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
18
19 BEGIN_EVENT_TABLE(wxStaticBox, wxControl)
20 EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground)
21 END_EVENT_TABLE()
22
23 /*
24 * Static box
25 */
26
27 bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
28 const wxString& label,
29 const wxPoint& pos,
30 const wxSize& size,
31 long style,
32 const wxString& name)
33 {
34 if ( !wxControl::Create(parent, id, pos, size,
35 style, wxDefaultValidator, name) )
36 return false;
37
38 Rect bounds ;
39 Str255 title ;
40
41 MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
42
43 m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1,
44 kControlGroupBoxTextTitleProc , (long) this ) ;
45
46 MacPostControlCreate() ;
47
48 return TRUE;
49 }