]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/statbmp.mm
The mmedia contrib requires sys/soundcard.h on unix, so disable it on unix
[wxWidgets.git] / src / cocoa / statbmp.mm
CommitLineData
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
065e208e 9// Licence: wxWidgets licence
da0634c1
DE
10/////////////////////////////////////////////////////////////////////////////
11
449c5673
DE
12#include "wx/wxprec.h"
13#ifndef WX_PRECOMP
14 #include "wx/app.h"
15 #include "wx/statbmp.h"
16#endif //WX_PRECOMP
9556c0f1 17#include "wx/cocoa/autorelease.h"
da0634c1 18
0ca6987d 19#import <AppKit/NSImageView.h>
a8c80eb1 20
da0634c1
DE
21IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
22BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
23END_EVENT_TABLE()
24// WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
25
26bool 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{
9556c0f1 33 wxAutoNSAutoreleasePool pool;
da0634c1
DE
34 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
35 return false;
36 m_cocoaNSView = NULL;
0ca6987d 37 SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
a8c80eb1 38 [m_cocoaNSView release];
da0634c1
DE
39 if(m_parent)
40 m_parent->CocoaAddChild(this);
8d656ea9
DE
41 SetInitialFrameRect(pos,size);
42
da0634c1
DE
43 return true;
44}
45
46wxStaticBitmap::~wxStaticBitmap()
47{
da0634c1
DE
48}
49
50void wxStaticBitmap::SetIcon(const wxIcon& icon)
51{
52}
53
54void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
55{
56}
57
58wxBitmap wxStaticBitmap::GetBitmap() const
59{
60 return wxNullBitmap;
61}
62