bmpmotif.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/bmpmotif.h
  3. // Purpose: Motif-specific bitmap routines
  4. // Author: Julian Smart, originally in bitmap.h
  5. // Modified by:
  6. // Created: 25/03/2003
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_BMPMOTIF_H_
  11. #define _WX_BMPMOTIF_H_
  12. #include "wx/defs.h"
  13. #include "wx/bitmap.h"
  14. class WXDLLIMPEXP_CORE wxBitmapCache
  15. {
  16. public:
  17. wxBitmapCache()
  18. {
  19. m_labelPixmap = (WXPixmap)NULL;
  20. m_armPixmap = (WXPixmap)NULL;
  21. m_insensPixmap = (WXPixmap)NULL;
  22. m_image = (WXImage)NULL;
  23. m_display = NULL;
  24. SetColoursChanged();
  25. }
  26. ~wxBitmapCache();
  27. void SetColoursChanged();
  28. void SetBitmap( const wxBitmap& bitmap );
  29. WXPixmap GetLabelPixmap( WXWidget w );
  30. WXPixmap GetInsensPixmap( WXWidget w = (WXWidget)NULL );
  31. WXPixmap GetArmPixmap( WXWidget w );
  32. private:
  33. void InvalidateCache();
  34. void CreateImageIfNeeded( WXWidget w );
  35. WXPixmap GetPixmapFromCache(WXWidget w);
  36. struct
  37. {
  38. bool label : 1;
  39. bool arm : 1;
  40. bool insens : 1;
  41. } m_recalcPixmaps;
  42. wxBitmap m_bitmap;
  43. WXDisplay* m_display;
  44. WXPixmap m_labelPixmap, m_armPixmap, m_insensPixmap;
  45. WXImage m_image;
  46. };
  47. #endif // _WX_BMPMOTIF_H_