]> git.saurik.com Git - wxWidgets.git/blob - src/osx/cocoa/statline.mm
add parentheses for && inside || to fix g++ 4.3 warning
[wxWidgets.git] / src / osx / cocoa / statline.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/cocoa/statline.mm
3 // Purpose: wxStaticLine class
4 // Author: Stefan Csomor
5 // Created: 28.06.99
6 // Version: $Id: statline.mm 54129 2008-06-11 19:30:52Z SC $
7 // Copyright: (c) 2008 Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #if wxUSE_STATLINE
27
28 #include "wx/statline.h"
29
30 #ifndef WX_PRECOMP
31 #include "wx/statbox.h"
32 #endif
33
34 #include "wx/osx/private.h"
35
36 @implementation wxNSBox
37
38 - (void)setImplementation: (wxWidgetImpl *) theImplementation
39 {
40 m_impl = theImplementation;
41 }
42
43 - (wxWidgetImpl*) implementation
44 {
45 return m_impl;
46 }
47
48 - (BOOL) isFlipped
49 {
50 return YES;
51 }
52
53 @end
54
55 wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer,
56 wxWindowMac* parent,
57 wxWindowID id,
58 const wxPoint& pos,
59 const wxSize& size,
60 long style,
61 long extraStyle)
62 {
63 NSView* sv = (wxpeer->GetParent()->GetHandle() );
64
65 NSRect r = wxToNSRect( sv, wxRect( pos, size) );
66 // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ;
67 wxNSBox* v = [[wxNSBox alloc] initWithFrame:r];
68 [sv addSubview:v];
69 wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
70 [v setImplementation:c];
71 return c;
72 }
73
74 #endif //wxUSE_STATLINE