]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: _imaglist.i | |
3 | // Purpose: SWIG interface defs for wxImageList and releated classes | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 7-July-1997 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 2003 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | // Not a %module | |
14 | ||
15 | ||
16 | //--------------------------------------------------------------------------- | |
17 | ||
18 | %{ | |
19 | %} | |
20 | ||
21 | //--------------------------------------------------------------------------- | |
22 | %newgroup | |
23 | ||
24 | enum { | |
25 | wxIMAGELIST_DRAW_NORMAL , | |
26 | wxIMAGELIST_DRAW_TRANSPARENT, | |
27 | wxIMAGELIST_DRAW_SELECTED, | |
28 | wxIMAGELIST_DRAW_FOCUSED, | |
29 | ||
30 | wxIMAGE_LIST_NORMAL, | |
31 | wxIMAGE_LIST_SMALL, | |
32 | wxIMAGE_LIST_STATE | |
33 | }; | |
34 | ||
35 | ||
ab1f7d2a RD |
36 | MustHaveApp(wxImageList); |
37 | ||
d14a1e28 RD |
38 | |
39 | // wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to | |
40 | // images for their items by an index into an image list. | |
41 | // A wxImageList is capable of creating images with optional masks from | |
42 | // a variety of sources - a single bitmap plus a colour to indicate the mask, | |
43 | // two bitmaps, or an icon. | |
44 | class wxImageList : public wxObject { | |
45 | public: | |
3ecece7e RD |
46 | // turn off this typemap |
47 | %typemap(out) wxImageList*; | |
48 | ||
a72f4631 | 49 | wxImageList(int width, int height, int mask=true, int initialCount=1); |
d14a1e28 | 50 | ~wxImageList(); |
3ecece7e RD |
51 | |
52 | // Turn it back on again | |
53 | %typemap(out) wxImageList* { $result = wxPyMake_wxObject($1, $owner); } | |
d14a1e28 RD |
54 | |
55 | int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); | |
1b8c7ba6 RD |
56 | %Rename(AddWithColourMask,int, Add(const wxBitmap& bitmap, const wxColour& maskColour)); |
57 | %Rename(AddIcon,int, Add(const wxIcon& icon)); | |
13112643 RD |
58 | |
59 | wxBitmap GetBitmap(int index) const; | |
60 | wxIcon GetIcon(int index) const; | |
61 | ||
d14a1e28 | 62 | bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); |
d14a1e28 RD |
63 | |
64 | bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL, | |
a72f4631 | 65 | const bool solidBackground = false); |
d14a1e28 RD |
66 | |
67 | int GetImageCount(); | |
68 | bool Remove(int index); | |
69 | bool RemoveAll(); | |
322913ce RD |
70 | |
71 | DocDeclA( | |
72 | void, GetSize(int index, int& OUTPUT, int& OUTPUT), | |
2965bd7b | 73 | "GetSize(index) -> (width,height)"); |
322913ce | 74 | |
76b8fa1d RD |
75 | %property(ImageCount, GetImageCount, doc="See `GetImageCount`"); |
76 | %property(Size, GetSize, doc="See `GetSize`"); | |
d14a1e28 RD |
77 | }; |
78 | ||
79 | //--------------------------------------------------------------------------- |