1wxImageList(3)             Erlang Module Definition             wxImageList(3)
2
3
4

NAME

6       wxImageList - Functions for wxImageList class
7

DESCRIPTION

9       A wxImageList contains a list of images, which are stored in an unspec‐
10       ified form. Images can have masks for transparent drawing, and  can  be
11       made from a variety of sources including bitmaps and icons.
12
13       wxImageList  is  used  principally  in  conjunction with wxTreeCtrl and
14       wxListCtrl classes.
15
16       See: wxTreeCtrl, wxListCtrl
17
18       wxWidgets docs: wxImageList
19

DATA TYPES

21       wxImageList() = wx:wx_object()
22

EXPORTS

24       new() -> wxImageList()
25
26              Default ctor.
27
28       new(Width, Height) -> wxImageList()
29
30              Types:
31
32                 Width = Height = integer()
33
34       new(Width, Height, Options :: [Option]) -> wxImageList()
35
36              Types:
37
38                 Width = Height = integer()
39                 Option = {mask, boolean()} | {initialCount, integer()}
40
41              Constructor specifying  the  image  size,  whether  image  masks
42              should be created, and the initial size of the list.
43
44              See: create/4
45
46       add(This, Icon) -> integer()
47
48              Types:
49
50                 This = wxImageList()
51                 Icon = wxIcon:wxIcon() | wxBitmap:wxBitmap()
52
53              Adds a new image using an icon.
54
55              Return: The new zero-based image index.
56
57              Remark: The original bitmap or icon is not affected by the add/3
58              operation, and can be deleted afterwards. If the bitmap is wider
59              than  the images in the list, then the bitmap will automatically
60              be split into smaller images, each matching  the  dimensions  of
61              the image list. This does not apply when adding icons.
62
63              Only for:wxmsw,wxosx
64
65       add(This, Bitmap, Mask) -> integer()
66
67       add(This, Bitmap, MaskColour) -> integer()
68
69              Types:
70
71                 This = wxImageList()
72                 Bitmap = wxBitmap:wxBitmap()
73                 MaskColour = wx:wx_colour()
74
75              Adds a new image or images using a bitmap and mask colour.
76
77              Return: The new zero-based image index.
78
79              Remark: The original bitmap or icon is not affected by the add/3
80              operation, and can be deleted afterwards. If the bitmap is wider
81              than  the images in the list, then the bitmap will automatically
82              be split into smaller images, each matching  the  dimensions  of
83              the image list. This does not apply when adding icons.
84
85       create(This, Width, Height) -> boolean()
86
87              Types:
88
89                 This = wxImageList()
90                 Width = Height = integer()
91
92       create(This, Width, Height, Options :: [Option]) -> boolean()
93
94              Types:
95
96                 This = wxImageList()
97                 Width = Height = integer()
98                 Option = {mask, boolean()} | {initialCount, integer()}
99
100              Initializes the list.
101
102              See new/3 for details.
103
104       draw(This, Index, Dc, X, Y) -> boolean()
105
106              Types:
107
108                 This = wxImageList()
109                 Index = integer()
110                 Dc = wxDC:wxDC()
111                 X = Y = integer()
112
113       draw(This, Index, Dc, X, Y, Options :: [Option]) -> boolean()
114
115              Types:
116
117                 This = wxImageList()
118                 Index = integer()
119                 Dc = wxDC:wxDC()
120                 X = Y = integer()
121                 Option = {flags, integer()} | {solidBackground, boolean()}
122
123              Draws a specified image onto a device context.
124
125       getBitmap(This, Index) -> wxBitmap:wxBitmap()
126
127              Types:
128
129                 This = wxImageList()
130                 Index = integer()
131
132              Returns the bitmap corresponding to the given index.
133
134       getIcon(This, Index) -> wxIcon:wxIcon()
135
136              Types:
137
138                 This = wxImageList()
139                 Index = integer()
140
141              Returns the icon corresponding to the given index.
142
143       getImageCount(This) -> integer()
144
145              Types:
146
147                 This = wxImageList()
148
149              Returns the number of images in the list.
150
151       getSize(This, Index) -> Result
152
153              Types:
154
155                 Result =
156                     {Res  ::  boolean(),  Width :: integer(), Height :: inte‐
157                 ger()}
158                 This = wxImageList()
159                 Index = integer()
160
161              Retrieves the size of the images in the list.
162
163              Currently, the index parameter is ignored as all images  in  the
164              list have the same size.
165
166              Return:  true if the function succeeded, false if it failed (for
167              example, if the image list was not yet initialized).
168
169       remove(This, Index) -> boolean()
170
171              Types:
172
173                 This = wxImageList()
174                 Index = integer()
175
176              Removes the image at the given position.
177
178       removeAll(This) -> boolean()
179
180              Types:
181
182                 This = wxImageList()
183
184              Removes all the images in the list.
185
186       replace(This, Index, Icon) -> boolean()
187
188              Types:
189
190                 This = wxImageList()
191                 Index = integer()
192                 Icon = wxIcon:wxIcon() | wxBitmap:wxBitmap()
193
194              Replaces the existing image with the new image.
195
196              Return: true if the replacement was successful, false otherwise.
197
198              Remark: The original bitmap or icon is not affected by  the  re‐
199              place/4 operation, and can be deleted afterwards.
200
201              Only for:wxmsw,wxosx
202
203       replace(This, Index, Bitmap, Mask) -> boolean()
204
205              Types:
206
207                 This = wxImageList()
208                 Index = integer()
209                 Bitmap = Mask = wxBitmap:wxBitmap()
210
211              Replaces the existing image with the new image.
212
213              Windows only.
214
215              Return: true if the replacement was successful, false otherwise.
216
217              Remark:  The  original bitmap or icon is not affected by the re‐
218              place/4 operation, and can be deleted afterwards.
219
220       destroy(This :: wxImageList()) -> ok
221
222              Destroys the object.
223
224
225
226wxWidgets team.                    wx 2.1.4                     wxImageList(3)
Impressum