]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/bmpmotif.h
More updates to the Debian packaging for wxPython, unicode and
[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 struct
48 {
49 bool label : 1;
50 bool arm : 1;
51 bool insens : 1;
52 } m_recalcPixmaps;
53 wxBitmap m_bitmap;
54 WXDisplay* m_display;
55 WXPixmap m_labelPixmap, m_armPixmap, m_insensPixmap;
56 WXImage m_image;
57 };
58
59 #endif // _WX_BMPMOTIF_H_