]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/statline2.mm
Added wxRichTextXMLHandler::RegisterNodeName so custom content classes can be added...
[wxWidgets.git] / src / cocoa / statline2.mm
CommitLineData
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
2903e699 7// RCS-ID: $Id$
da0634c1 8// Copyright: (c) 2003 David Elliott
526954c5 9// Licence: wxWindows 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
22BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
23END_EVENT_TABLE()
24// WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)
25
26bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid,
27 const wxPoint& pos,
28 const wxSize& size,
29 long style,
30 const wxString& name)
31{
bed6fe0c 32 wxAutoNSAutoreleasePool pool;
da0634c1
DE
33 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
34 return false;
26916975 35 SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]);
d5f22969 36 [m_cocoaNSView release];
26916975 37 [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator];
da0634c1
DE
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
8d656ea9
DE
40 SetInitialFrameRect(pos,size);
41
da0634c1
DE
42 return true;
43}
44
45wxStaticLine::~wxStaticLine()
46{
da0634c1
DE
47}
48