statbmp.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/statbmp.h
  3. // Purpose: wxStaticBitmap class interface
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 25.08.00
  7. // Copyright: (c) 2000 Vadim Zeitlin
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_STATBMP_H_BASE_
  11. #define _WX_STATBMP_H_BASE_
  12. #include "wx/defs.h"
  13. #if wxUSE_STATBMP
  14. #include "wx/control.h"
  15. #include "wx/bitmap.h"
  16. #include "wx/icon.h"
  17. extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[];
  18. // a control showing an icon or a bitmap
  19. class WXDLLIMPEXP_CORE wxStaticBitmapBase : public wxControl
  20. {
  21. public:
  22. wxStaticBitmapBase() { }
  23. virtual ~wxStaticBitmapBase();
  24. // our interface
  25. virtual void SetIcon(const wxIcon& icon) = 0;
  26. virtual void SetBitmap(const wxBitmap& bitmap) = 0;
  27. virtual wxBitmap GetBitmap() const = 0;
  28. virtual wxIcon GetIcon() const /* = 0 -- should be pure virtual */
  29. {
  30. // stub it out here for now as not all ports implement it (but they
  31. // should)
  32. return wxIcon();
  33. }
  34. // overridden base class virtuals
  35. virtual bool AcceptsFocus() const { return false; }
  36. virtual bool HasTransparentBackground() { return true; }
  37. protected:
  38. // choose the default border for this window
  39. virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
  40. virtual wxSize DoGetBestSize() const;
  41. wxDECLARE_NO_COPY_CLASS(wxStaticBitmapBase);
  42. };
  43. #if defined(__WXUNIVERSAL__)
  44. #include "wx/univ/statbmp.h"
  45. #elif defined(__WXMSW__)
  46. #include "wx/msw/statbmp.h"
  47. #elif defined(__WXMOTIF__)
  48. #include "wx/motif/statbmp.h"
  49. #elif defined(__WXGTK20__)
  50. #include "wx/gtk/statbmp.h"
  51. #elif defined(__WXGTK__)
  52. #include "wx/gtk1/statbmp.h"
  53. #elif defined(__WXMAC__)
  54. #include "wx/osx/statbmp.h"
  55. #elif defined(__WXCOCOA__)
  56. #include "wx/cocoa/statbmp.h"
  57. #elif defined(__WXPM__)
  58. #include "wx/os2/statbmp.h"
  59. #endif
  60. #endif // wxUSE_STATBMP
  61. #endif
  62. // _WX_STATBMP_H_BASE_