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