]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/statbmp.mm
OSX Info.plist
[wxWidgets.git] / src / cocoa / statbmp.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13 #ifndef WX_PRECOMP
14 #include "wx/app.h"
15 #include "wx/statbmp.h"
16 #endif //WX_PRECOMP
17 #include "wx/cocoa/autorelease.h"
18
19 #import <AppKit/NSImageView.h>
20
21 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
22 BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
23 END_EVENT_TABLE()
24 // WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
25
26 bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
27 const wxBitmap& bitmap,
28 const wxPoint& pos,
29 const wxSize& size,
30 long style,
31 const wxString& name)
32 {
33 wxAutoNSAutoreleasePool pool;
34 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
35 return false;
36 m_cocoaNSView = NULL;
37 SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
38 [m_cocoaNSView release];
39 if(m_parent)
40 m_parent->CocoaAddChild(this);
41 SetInitialFrameRect(pos,size);
42
43 return true;
44 }
45
46 wxStaticBitmap::~wxStaticBitmap()
47 {
48 }
49
50 void wxStaticBitmap::SetIcon(const wxIcon& icon)
51 {
52 }
53
54 void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
55 {
56 }
57
58 wxBitmap wxStaticBitmap::GetBitmap() const
59 {
60 return wxNullBitmap;
61 }
62