]> git.saurik.com Git - wxWidgets.git/blob - src/osx/cocoa/statbox.mm
committing current cocoa state just to be safe ...
[wxWidgets.git] / src / osx / cocoa / statbox.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbox.cpp
3 // Purpose: wxStaticBox
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id: statbox.cpp 54129 2008-06-11 19:30:52Z SC $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13
14 #if wxUSE_STATBOX
15
16 #include "wx/statbox.h"
17 #include "wx/osx/private.h"
18
19 @implementation wxNSBox
20
21 - (void)setImplementation: (wxWidgetImpl *) theImplementation
22 {
23 impl = theImplementation;
24 }
25
26 - (wxWidgetImpl*) implementation
27 {
28 return impl;
29 }
30
31 - (BOOL) isFlipped
32 {
33 return NO;
34 }
35
36 @end
37
38 wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer,
39 wxWindowMac* parent,
40 wxWindowID id,
41 const wxString& label,
42 const wxPoint& pos,
43 const wxSize& size,
44 long style,
45 long extraStyle)
46 {
47 NSView* sv = (wxpeer->GetParent()->GetHandle() );
48
49 NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
50 wxNSBox* v = [[wxNSBox alloc] initWithFrame:r];
51 [sv addSubview:v];
52 wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
53 [v setImplementation:c];
54 return c;
55 }
56
57 #endif // wxUSE_STATBOX
58