]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/withimages.h
Define __VISUALC__ for ICC under Windows again.
[wxWidgets.git] / interface / wx / withimages.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: withimages.h
3 // Purpose: Interface of wxWithImages class.
4 // Licence: wxWindows licence
5 ///////////////////////////////////////////////////////////////////////////////
6
7 /**
8 A mixin class to be used with other classes that use a wxImageList.
9 */
10 class wxWithImages
11 {
12 public:
13 enum
14 {
15 NO_IMAGE = -1
16 };
17
18 wxWithImages();
19 virtual ~wxWithImages();
20
21 /**
22 Sets the image list for the page control and takes ownership of the list.
23
24 @see wxImageList, SetImageList()
25 */
26 void AssignImageList(wxImageList* imageList);
27
28 /**
29 Sets the image list to use. It does not take ownership of the image
30 list, you must delete it yourself.
31
32 @see wxImageList, AssignImageList()
33 */
34 virtual void SetImageList(wxImageList* imageList);
35
36 /**
37 Returns the associated image list, may be NULL.
38
39 @see wxImageList, SetImageList()
40 */
41 wxImageList* GetImageList() const;
42
43 protected:
44 /**
45 Return true if we have a valid image list.
46 */
47 bool HasImageList() const;
48
49 /**
50 Return the image with the given index from the image list.
51
52 If there is no image list or if index == NO_IMAGE, silently returns
53 wxNullIcon.
54 */
55 wxIcon GetImage(int iconIndex) const;
56 };