1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbmp.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1999-06-21 21:29:40 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKSTATICBITMAPH__
|
|
|
|
#define __GTKSTATICBITMAPH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1999-06-14 23:04:05 +00:00
|
|
|
|
|
|
|
#if wxUSE_STATBMP
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/control.h"
|
1999-01-04 13:52:06 +00:00
|
|
|
#include "wx/bitmap.h"
|
1999-06-22 08:36:29 +00:00
|
|
|
#include "wx/icon.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxStaticBitmap;
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern const char* wxStaticBitmapNameStr;
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxStaticBitmap
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
class wxStaticBitmap: public wxControl
|
|
|
|
{
|
1999-06-21 21:29:40 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxStaticBitmap();
|
|
|
|
wxStaticBitmap( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr );
|
|
|
|
bool Create( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
virtual void SetBitmap( const wxBitmap& bitmap );
|
1999-06-21 21:29:40 +00:00
|
|
|
|
|
|
|
wxBitmap& GetBitmap() { return m_bitmap; }
|
|
|
|
const wxBitmap& GetBitmap() const { return m_bitmap; }
|
|
|
|
|
|
|
|
// for compatibility with wxMSW
|
1999-06-28 22:06:24 +00:00
|
|
|
const wxIcon& GetIcon() const
|
|
|
|
{
|
|
|
|
// don't use wxDynamicCast, icons and bitmaps are really the same thing
|
|
|
|
// in wxGTK
|
|
|
|
return (const wxIcon &)m_bitmap;
|
|
|
|
}
|
1999-06-21 21:29:40 +00:00
|
|
|
|
1999-07-25 14:38:28 +00:00
|
|
|
// for compatibility with wxMSW
|
|
|
|
void SetIcon(const wxIcon& icon)
|
|
|
|
{
|
|
|
|
SetBitmap( icon );
|
|
|
|
}
|
|
|
|
|
1999-06-21 21:29:40 +00:00
|
|
|
private:
|
1999-07-07 16:00:06 +00:00
|
|
|
// creates the new pixmap widget
|
|
|
|
void CreatePixmapWidget();
|
|
|
|
|
1999-06-21 21:29:40 +00:00
|
|
|
wxBitmap m_bitmap;
|
1998-05-28 22:05:55 +00:00
|
|
|
};
|
|
|
|
|
1999-06-14 23:04:05 +00:00
|
|
|
#endif
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif // __GTKSTATICBITMAPH__
|