]>
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 | |
9 | // Licence: wxWindows license | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include "wx/app.h" | |
13 | #include "wx/statline.h" | |
14 | ||
26916975 | 15 | #import <AppKit/NSBox.h> |
d5f22969 | 16 | |
da0634c1 DE |
17 | IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) |
18 | BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase) | |
19 | END_EVENT_TABLE() | |
20 | // WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView) | |
21 | ||
22 | bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid, | |
23 | const wxPoint& pos, | |
24 | const wxSize& size, | |
25 | long style, | |
26 | const wxString& name) | |
27 | { | |
28 | if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) | |
29 | return false; | |
26916975 | 30 | SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]); |
d5f22969 | 31 | [m_cocoaNSView release]; |
26916975 | 32 | [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator]; |
da0634c1 DE |
33 | if(m_parent) |
34 | m_parent->CocoaAddChild(this); | |
8d656ea9 DE |
35 | SetInitialFrameRect(pos,size); |
36 | ||
da0634c1 DE |
37 | return true; |
38 | } | |
39 | ||
40 | wxStaticLine::~wxStaticLine() | |
41 | { | |
da0634c1 DE |
42 | } |
43 |