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