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