]>
Commit | Line | Data |
---|---|---|
da0634c1 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: src/cocoa/statline2.mm |
da0634c1 DE |
3 | // Purpose: wxStaticLine |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/02/15 | |
da0634c1 | 7 | // Copyright: (c) 2003 David Elliott |
526954c5 | 8 | // Licence: wxWindows licence |
da0634c1 DE |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
449c5673 DE |
11 | #include "wx/wxprec.h" |
12 | #ifndef WX_PRECOMP | |
13 | #include "wx/app.h" | |
14 | #endif //WX_PRECOMP | |
da0634c1 DE |
15 | #include "wx/statline.h" |
16 | ||
bed6fe0c DE |
17 | #include "wx/cocoa/autorelease.h" |
18 | ||
26916975 | 19 | #import <AppKit/NSBox.h> |
d5f22969 | 20 | |
da0634c1 DE |
21 | BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase) |
22 | END_EVENT_TABLE() | |
23 | // WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView) | |
24 | ||
25 | bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, | |
26 | const wxPoint& pos, | |
27 | const wxSize& size, | |
28 | long style, | |
29 | const wxString& name) | |
30 | { | |
bed6fe0c | 31 | wxAutoNSAutoreleasePool pool; |
da0634c1 DE |
32 | if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) |
33 | return false; | |
26916975 | 34 | SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]); |
d5f22969 | 35 | [m_cocoaNSView release]; |
26916975 | 36 | [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator]; |
da0634c1 DE |
37 | if(m_parent) |
38 | m_parent->CocoaAddChild(this); | |
8d656ea9 DE |
39 | SetInitialFrameRect(pos,size); |
40 | ||
da0634c1 DE |
41 | return true; |
42 | } | |
43 | ||
44 | wxStaticLine::~wxStaticLine() | |
45 | { | |
da0634c1 DE |
46 | } |
47 |