2001-06-26 16:59:19 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/statbmp.h
|
|
|
|
// Purpose: wxStaticBitmap class interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 25.08.00
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2000 Vadim Zeitlin
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 16:59:19 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_STATBMP_H_BASE_
|
|
|
|
#define _WX_STATBMP_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2003-07-09 17:48:53 -04:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#if wxUSE_STATBMP
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
#include "wx/bitmap.h"
|
2005-12-19 08:56:23 -05:00
|
|
|
#include "wx/icon.h"
|
2001-06-26 16:59:19 -04:00
|
|
|
|
2006-01-16 09:59:55 -05:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxStaticBitmapNameStr[];
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
// a control showing an icon or a bitmap
|
|
|
|
class WXDLLEXPORT wxStaticBitmapBase : public wxControl
|
|
|
|
{
|
2003-07-21 20:24:07 -04:00
|
|
|
public:
|
|
|
|
wxStaticBitmapBase() { }
|
2002-01-07 16:52:28 -05:00
|
|
|
virtual ~wxStaticBitmapBase();
|
2004-09-22 10:38:52 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// our interface
|
|
|
|
virtual void SetIcon(const wxIcon& icon) = 0;
|
|
|
|
virtual void SetBitmap(const wxBitmap& bitmap) = 0;
|
|
|
|
virtual wxBitmap GetBitmap() const = 0;
|
2005-12-19 08:56:23 -05:00
|
|
|
virtual wxIcon GetIcon() const /* = 0 -- should be pure virtual */
|
|
|
|
{
|
|
|
|
// stub it out here for now as not all ports implement it (but they
|
|
|
|
// should)
|
|
|
|
return wxIcon();
|
|
|
|
}
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
// overriden base class virtuals
|
2004-09-22 10:38:52 -04:00
|
|
|
virtual bool AcceptsFocus() const { return false; }
|
2005-04-17 11:34:05 -04:00
|
|
|
virtual bool HasTransparentBackground() { return true; }
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
protected:
|
2004-04-07 17:47:04 -04:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
2003-07-21 20:24:07 -04:00
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(wxStaticBitmapBase)
|
2001-06-26 16:59:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/statbmp.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#include "wx/msw/statbmp.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/motif/statbmp.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK20__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/gtk/statbmp.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/statbmp.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/mac/statbmp.h"
|
2003-03-22 01:18:36 -05:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/statbmp.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/os2/statbmp.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_STATBMP
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_STATBMP_H_BASE_
|