Copyright 2007 Software 2000 Ltd.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47984
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifndef __WX_COCOA_STATBMP_H__
#define __WX_COCOA_STATBMP_H__
#ifndef __WX_COCOA_STATBMP_H__
#define __WX_COCOA_STATBMP_H__
-// #include "wx/cocoa/NSxxx.h"
+DECLARE_WXCOCOA_OBJC_CLASS(NSImageView);
// ========================================================================
// wxStaticBitmap
// ========================================================================
// wxStaticBitmap
// ------------------------------------------------------------------------
// Cocoa specifics
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Cocoa specifics
// ------------------------------------------------------------------------
+ WX_NSImageView GetNSImageView() { return (WX_NSImageView)m_cocoaNSView; }
+ wxBitmap m_bitmap;
+
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
wxAutoNSAutoreleasePool pool;
if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
return false;
wxAutoNSAutoreleasePool pool;
if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
return false;
SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
SetNSView([[NSImageView alloc] initWithFrame: MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
+
+ [GetNSImageView() setImage:bitmap.GetNSImage(true)];
+ m_bitmap = bitmap;
+
if(m_parent)
m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,size);
if(m_parent)
m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,size);
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
{
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
{
+ [GetNSImageView() setImage:bitmap.GetNSImage(true)];
+ m_bitmap = bitmap;
}
wxBitmap wxStaticBitmap::GetBitmap() const
{
}
wxBitmap wxStaticBitmap::GetBitmap() const
{