mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-12 00:59:11 +01:00
d14efe561b
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
77 lines
2.3 KiB
C++
77 lines
2.3 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/generic/statbmpg.h
|
|
// Purpose: wxGenericStaticBitmap header
|
|
// Author: Marcin Wojdyr, Stefan Csomor
|
|
// Created: 2008-06-16
|
|
// RCS-ID: $Id: statbmpg.h 61724 2009-08-21 10:41:26Z VZ $
|
|
// Copyright: wxWidgets developers
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_GENERIC_STATBMP_H_
|
|
#define _WX_GENERIC_STATBMP_H_
|
|
|
|
#include "wx/statbmp.h"
|
|
|
|
class WXDLLIMPEXP_CORE wxGenericStaticBitmap : public wxStaticBitmapBase
|
|
{
|
|
public:
|
|
wxGenericStaticBitmap() {}
|
|
wxGenericStaticBitmap(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxBitmap& bitmap,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxString& name = wxStaticBitmapNameStr)
|
|
{
|
|
Create(parent, id, bitmap, pos, size, style, name);
|
|
}
|
|
|
|
bool Create(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxBitmap& bitmap,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxString& name = wxStaticBitmapNameStr);
|
|
|
|
virtual void SetBitmap(const wxBitmap& bitmap)
|
|
{
|
|
m_bitmap = bitmap;
|
|
SetInitialSize(GetBitmapSize());
|
|
Refresh();
|
|
}
|
|
|
|
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
|
|
|
virtual void SetIcon(const wxIcon& icon)
|
|
{
|
|
m_bitmap.CopyFromIcon(icon);
|
|
SetInitialSize(GetBitmapSize());
|
|
Refresh();
|
|
}
|
|
|
|
#if defined(__WXGTK20__) || defined(__WXMAC__)
|
|
// icons and bitmaps are really the same thing in wxGTK and wxMac
|
|
wxIcon GetIcon() const { return (const wxIcon &)m_bitmap; }
|
|
#endif
|
|
|
|
|
|
private:
|
|
wxSize GetBitmapSize()
|
|
{
|
|
return m_bitmap.Ok() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
|
|
: wxSize(16, 16); // this is completely arbitrary
|
|
}
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
wxBitmap m_bitmap;
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGenericStaticBitmap)
|
|
};
|
|
|
|
|
|
#endif //_WX_GENERIC_STATBMP_H_
|