]>
Commit | Line | Data |
---|---|---|
da0634c1 DE |
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/app.h" | |
13 | #include "wx/statbmp.h" | |
14 | ||
a8c80eb1 DE |
15 | #import <AppKit/NSView.h> |
16 | ||
da0634c1 DE |
17 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) |
18 | BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl) | |
19 | END_EVENT_TABLE() | |
20 | // WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView) | |
21 | ||
22 | bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid, | |
23 | const wxBitmap& bitmap, | |
24 | const wxPoint& pos, | |
25 | const wxSize& size, | |
26 | long style, | |
27 | const wxString& name) | |
28 | { | |
29 | if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) | |
30 | return false; | |
31 | m_cocoaNSView = NULL; | |
a8c80eb1 DE |
32 | SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]); |
33 | [m_cocoaNSView release]; | |
da0634c1 DE |
34 | if(m_parent) |
35 | m_parent->CocoaAddChild(this); | |
36 | return true; | |
37 | } | |
38 | ||
39 | wxStaticBitmap::~wxStaticBitmap() | |
40 | { | |
41 | CocoaRemoveFromParent(); | |
a8c80eb1 | 42 | SetNSView(NULL); |
da0634c1 DE |
43 | } |
44 | ||
45 | void wxStaticBitmap::SetIcon(const wxIcon& icon) | |
46 | { | |
47 | } | |
48 | ||
49 | void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) | |
50 | { | |
51 | } | |
52 | ||
53 | wxBitmap wxStaticBitmap::GetBitmap() const | |
54 | { | |
55 | return wxNullBitmap; | |
56 | } | |
57 |