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