]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/statbmp.mm
byte length for interim UniChar String corrected
[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
18 #import <AppKit/NSImageView.h>
19
20 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
21 BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
22 END_EVENT_TABLE()
23 // WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
24
25 bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
26 const wxBitmap& bitmap,
27 const wxPoint& pos,
28 const wxSize& size,
29 long style,
30 const wxString& name)
31 {
32 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
33 return false;
34 m_cocoaNSView = NULL;
35 SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
36 [m_cocoaNSView release];
37 if(m_parent)
38 m_parent->CocoaAddChild(this);
39 SetInitialFrameRect(pos,size);
40
41 return true;
42 }
43
44 wxStaticBitmap::~wxStaticBitmap()
45 {
46 }
47
48 void wxStaticBitmap::SetIcon(const wxIcon& icon)
49 {
50 }
51
52 void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
53 {
54 }
55
56 wxBitmap wxStaticBitmap::GetBitmap() const
57 {
58 return wxNullBitmap;
59 }
60