1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbmp.h
|
|
|
|
// Purpose: wxStaticBitmap class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
1999-07-23 21:03:02 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_STATBMP_H_
|
|
|
|
#define _WX_STATBMP_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "statbmp.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
1999-07-28 22:38:39 +00:00
|
|
|
#include "wx/icon.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
class WXDLLEXPORT wxStaticBitmap : public wxControl
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2002-02-05 16:34:33 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
|
|
|
wxStaticBitmap() { }
|
|
|
|
~wxStaticBitmap();
|
2002-02-05 16:34:33 +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);
|
|
|
|
}
|
2002-02-05 16:34:33 +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);
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void SetBitmap(const wxBitmap& bitmap);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-07-28 22:38:39 +00:00
|
|
|
// for compatibility with wxMSW
|
|
|
|
const wxIcon& GetIcon() const
|
|
|
|
{
|
|
|
|
// don't use wxDynamicCast, icons and bitmaps are really the same thing
|
|
|
|
return (const wxIcon &)m_messageBitmap;
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-07-28 22:38:39 +00:00
|
|
|
// for compatibility with wxMSW
|
|
|
|
void SetIcon(const wxIcon& icon)
|
|
|
|
{
|
|
|
|
SetBitmap( icon );
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// overriden base class virtuals
|
|
|
|
virtual bool AcceptsFocus() const { return FALSE; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
|
|
|
wxBitmap m_messageBitmap;
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_STATBMP_H_
|