1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 14:31:55 +00:00
|
|
|
// Name: wx/motif/statbmp.h
|
1998-09-18 10:19:10 +00:00
|
|
|
// Purpose: wxStaticBitmap class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_STATBMP_H_
|
|
|
|
#define _WX_STATBMP_H_
|
|
|
|
|
2003-03-27 19:40:32 +00:00
|
|
|
#include "wx/motif/bmpmotif.h"
|
1999-07-28 22:38:39 +00:00
|
|
|
#include "wx/icon.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2002-02-05 16:34:33 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
|
|
|
wxStaticBitmap() { }
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxStaticBitmap();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
2002-02-05 16:34:33 +00:00
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr)
|
1999-02-22 11:01:13 +00:00
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, name);
|
|
|
|
}
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
2002-02-05 16:34:33 +00:00
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void SetBitmap(const wxBitmap& bitmap);
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
|
|
|
{
|
2005-02-06 17:38:33 +00:00
|
|
|
return false;
|
1999-07-23 21:03:02 +00:00
|
|
|
}
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2003-05-13 20:02:15 +00:00
|
|
|
wxBitmap GetBitmap() const { return m_messageBitmap; }
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-07-28 22:38:39 +00:00
|
|
|
// for compatibility with wxMSW
|
2003-05-13 20:02:15 +00:00
|
|
|
wxIcon GetIcon() const
|
1999-07-28 22:38:39 +00:00
|
|
|
{
|
|
|
|
// don't use wxDynamicCast, icons and bitmaps are really the same thing
|
2003-05-13 20:02:15 +00:00
|
|
|
return *(wxIcon*)&m_messageBitmap;
|
1999-07-28 22:38:39 +00:00
|
|
|
}
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-07-28 22:38:39 +00:00
|
|
|
// for compatibility with wxMSW
|
|
|
|
void SetIcon(const wxIcon& icon)
|
|
|
|
{
|
|
|
|
SetBitmap( icon );
|
|
|
|
}
|
2006-07-25 14:31:55 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2002-07-28 20:53:12 +00:00
|
|
|
protected:
|
|
|
|
void DoSetBitmap();
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
|
|
|
wxBitmap m_messageBitmap;
|
2002-07-28 20:53:12 +00:00
|
|
|
wxBitmap m_messageBitmapOriginal;
|
2003-03-27 19:40:32 +00:00
|
|
|
wxBitmapCache m_bitmapCache;
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_STATBMP_H_
|