]>
Commit | Line | Data |
---|---|---|
2646f485 SC |
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 | ||
24 | BEGIN_EVENT_TABLE(wxStaticBox, wxControl) | |
25 | EVT_ERASE_BACKGROUND(wxStaticBox::OnEraseBackground) | |
26 | END_EVENT_TABLE() | |
27 | ||
28 | #endif | |
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 | { | |
41 | if ( !wxControl::Create(parent, id, pos, size, | |
42 | style, wxDefaultValidator, name) ) | |
43 | return false; | |
44 | ||
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; | |
56 | } |