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