]>
Commit | Line | Data |
---|---|---|
e9576ca5 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: statbox.cpp | |
3 | // Purpose: wxStaticBox | |
a31a5f85 | 4 | // Author: Stefan Csomor |
e9576ca5 | 5 | // Modified by: |
a31a5f85 | 6 | // Created: 1998-01-01 |
e9576ca5 | 7 | // RCS-ID: $Id$ |
a31a5f85 | 8 | // Copyright: (c) Stefan Csomor |
e40298d5 | 9 | // Licence: wxWindows licence |
e9576ca5 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma implementation "statbox.h" | |
14 | #endif | |
15 | ||
d8c736e5 GD |
16 | #include "wx/defs.h" |
17 | ||
e9576ca5 | 18 | #include "wx/statbox.h" |
519cb848 | 19 | #include "wx/mac/uma.h" |
e9576ca5 | 20 | |
2f1ae414 | 21 | #if !USE_SHARED_LIBRARY |
e9576ca5 SC |
22 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) |
23 | ||
24 | BEGIN_EVENT_TABLE(wxStaticBox, wxControl) | |
e40298d5 | 25 | EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground) |
e9576ca5 SC |
26 | END_EVENT_TABLE() |
27 | ||
2f1ae414 | 28 | #endif |
e9576ca5 SC |
29 | |
30 | /* | |
31 | * Static box | |
32 | */ | |
33 | ||
34 | bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, | |
35 | const wxString& label, | |
36 | const wxPoint& pos, | |
37 | const wxSize& size, | |
38 | long style, | |
39 | const wxString& name) | |
40 | { | |
b45ed7a2 VZ |
41 | if ( !wxControl::Create(parent, id, pos, size, |
42 | style, wxDefaultValidator, name) ) | |
43 | return false; | |
44 | ||
e40298d5 JS |
45 | Rect bounds ; |
46 | Str255 title ; | |
47 | ||
48 | MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; | |
49 | ||
50 | m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, | |
51 | kControlGroupBoxTextTitleProc , (long) this ) ; | |
52 | ||
53 | MacPostControlCreate() ; | |
54 | ||
55 | return TRUE; | |
e9576ca5 | 56 | } |