1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/statbmp.mm
3 // Purpose: wxStaticBitmap
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
13 #include "wx/statbmp.h"
15 #import <AppKit/NSView.h>
17 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
18 BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
20 // WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
22 bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
23 const wxBitmap& bitmap,
29 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
32 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
33 [m_cocoaNSView release];
35 m_parent->CocoaAddChild(this);
36 SetInitialFrameRect(pos,size);
41 wxStaticBitmap::~wxStaticBitmap()
45 void wxStaticBitmap::SetIcon(const wxIcon& icon)
49 void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
53 wxBitmap wxStaticBitmap::GetBitmap() const