]> git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/statbox.cpp
don't reset the selection after event was vetoed if there is no old selection
[wxWidgets.git] / src / mac / classic / statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mac/classic/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/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
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 }