]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/statline2.mm
Implement SetBackground()
[wxWidgets.git] / src / cocoa / statline2.mm
CommitLineData
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
d5f22969
DE
15#import <AppKit/NSView.h>
16
da0634c1
DE
17IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
18BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
19END_EVENT_TABLE()
20// WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)
21
22bool 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;
d5f22969
DE
30 SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
31 [m_cocoaNSView release];
da0634c1
DE
32 if(m_parent)
33 m_parent->CocoaAddChild(this);
34 return true;
35}
36
37wxStaticLine::~wxStaticLine()
38{
39 CocoaRemoveFromParent();
d5f22969 40 SetNSView(NULL);
da0634c1
DE
41}
42