]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/statbmp.mm
fixed all the other ports broken by controls labels in wxToolBar patch commit
[wxWidgets.git] / src / cocoa / statbmp.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/cocoa/statbmp.mm
3 // Purpose: wxStaticBitmap
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/02/15
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWidgets licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13
14 #include "wx/statbmp.h"
15
16 #ifndef WX_PRECOMP
17 #include "wx/app.h"
18 #endif //WX_PRECOMP
19
20 #include "wx/cocoa/autorelease.h"
21
22 #import <AppKit/NSImageView.h>
23
24 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
25
26 BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
27 END_EVENT_TABLE()
28 // WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
29
30 bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
31 const wxBitmap& bitmap,
32 const wxPoint& pos,
33 const wxSize& size,
34 long style,
35 const wxString& name)
36 {
37 wxAutoNSAutoreleasePool pool;
38 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
39 return false;
40 m_cocoaNSView = NULL;
41 SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
42 [m_cocoaNSView release];
43 if(m_parent)
44 m_parent->CocoaAddChild(this);
45 SetInitialFrameRect(pos,size);
46
47 return true;
48 }
49
50 wxStaticBitmap::~wxStaticBitmap()
51 {
52 }
53
54 void wxStaticBitmap::SetIcon(const wxIcon& icon)
55 {
56 }
57
58 void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
59 {
60 }
61
62 wxBitmap wxStaticBitmap::GetBitmap() const
63 {
64 return wxNullBitmap;
65 }