]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/bmpmotif.h
64 bit compilation fix (pointer can't be cast to int); code simplification (don't...
[wxWidgets.git] / include / wx / motif / bmpmotif.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BMPMOTIF_H_
13 #define _WX_BMPMOTIF_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "bmpmotif.h"
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/bitmap.h"
21
22 class WXDLLEXPORT wxBitmapCache
23 {
24 public:
25 wxBitmapCache()
26 {
27 m_labelPixmap = (WXPixmap)NULL;
28 m_armPixmap = (WXPixmap)NULL;
29 m_insensPixmap = (WXPixmap)NULL;
30 m_image = (WXImage)NULL;
31 m_display = (WXDisplay*)NULL;
32 SetColoursChanged();
33 }
34
35 ~wxBitmapCache();
36
37 void SetColoursChanged();
38 void SetBitmap( const wxBitmap& bitmap );
39
40 WXPixmap GetLabelPixmap( WXWidget w );
41 WXPixmap GetInsensPixmap( WXWidget w = (WXWidget)NULL );
42 WXPixmap GetArmPixmap( WXWidget w );
43 private:
44 void InvalidateCache();
45 void CreateImageIfNeeded( WXWidget w );
46
47 WXPixmap GetPixmapFromCache(WXWidget w);
48
49 struct
50 {
51 bool label : 1;
52 bool arm : 1;
53 bool insens : 1;
54 } m_recalcPixmaps;
55 wxBitmap m_bitmap;
56 WXDisplay* m_display;
57 WXPixmap m_labelPixmap, m_armPixmap, m_insensPixmap;
58 WXImage m_image;
59 };
60
61 #endif // _WX_BMPMOTIF_H_