2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/statbmp.h
|
|
|
|
// Purpose: wxStaticBitmap class interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 25.08.00
|
|
|
|
// Copyright: (c) 2000 Vadim Zeitlin
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_STATBMP_H_BASE_
|
|
|
|
#define _WX_STATBMP_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2003-07-09 21:48:53 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_STATBMP
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
#include "wx/bitmap.h"
|
2005-12-19 13:56:23 +00:00
|
|
|
#include "wx/icon.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[];
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// a control showing an icon or a bitmap
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticBitmapBase : public wxControl
|
2001-06-26 20:59:19 +00:00
|
|
|
{
|
2003-07-22 00:24:07 +00:00
|
|
|
public:
|
|
|
|
wxStaticBitmapBase() { }
|
2002-01-07 21:52:28 +00:00
|
|
|
virtual ~wxStaticBitmapBase();
|
2004-09-22 14:38:52 +00:00
|
|
|
|
2001-06-26 20:59:19 +00: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 13:56:23 +00: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 20:59:19 +00:00
|
|
|
|
2011-03-22 14:17:38 +00:00
|
|
|
// overridden base class virtuals
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
|
|
|
|
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
protected:
|
2007-11-13 12:10:34 +00:00
|
|
|
// choose the default border for this window
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
|
2007-11-13 12:10:34 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxStaticBitmapBase);
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/statbmp.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#include "wx/msw/statbmp.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/motif/statbmp.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK20__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/gtk/statbmp.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/statbmp.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2008-06-11 19:17:41 +00:00
|
|
|
#include "wx/osx/statbmp.h"
|
2003-03-22 06:18:36 +00:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/statbmp.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_STATBMP
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_STATBMP_H_BASE_
|