]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/statbmp.mm
Include wx/combobox.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / cocoa / statbmp.mm
CommitLineData
da0634c1 1/////////////////////////////////////////////////////////////////////////////
e267406e 2// Name: src/cocoa/statbmp.mm
da0634c1
DE
3// Purpose: wxStaticBitmap
4// Author: David Elliott
5// Modified by:
6// Created: 2003/02/15
e267406e 7// RCS-ID: $Id$
da0634c1 8// Copyright: (c) 2003 David Elliott
e267406e 9// Licence: wxWidgets licence
da0634c1
DE
10/////////////////////////////////////////////////////////////////////////////
11
449c5673 12#include "wx/wxprec.h"
e267406e
WS
13
14#include "wx/statbmp.h"
15
449c5673
DE
16#ifndef WX_PRECOMP
17 #include "wx/app.h"
449c5673 18#endif //WX_PRECOMP
e267406e 19
9556c0f1 20#include "wx/cocoa/autorelease.h"
da0634c1 21
0ca6987d 22#import <AppKit/NSImageView.h>
a8c80eb1 23
da0634c1 24IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
e267406e 25
da0634c1
DE
26BEGIN_EVENT_TABLE(wxStaticBitmap, wxControl)
27END_EVENT_TABLE()
28// WX_IMPLEMENT_COCOA_OWNER(wxStaticBitmap,NSTextField,NSControl,NSView)
29
30bool 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{
9556c0f1 37 wxAutoNSAutoreleasePool pool;
da0634c1
DE
38 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
39 return false;
40 m_cocoaNSView = NULL;
0ca6987d 41 SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
a8c80eb1 42 [m_cocoaNSView release];
da0634c1
DE
43 if(m_parent)
44 m_parent->CocoaAddChild(this);
8d656ea9
DE
45 SetInitialFrameRect(pos,size);
46
da0634c1
DE
47 return true;
48}
49
50wxStaticBitmap::~wxStaticBitmap()
51{
da0634c1
DE
52}
53
54void wxStaticBitmap::SetIcon(const wxIcon& icon)
55{
56}
57
58void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
59{
60}
61
62wxBitmap wxStaticBitmap::GetBitmap() const
63{
64 return wxNullBitmap;
65}