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