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

NAME

6       wxIcon - Functions for wxIcon class
7

DESCRIPTION

9       An icon is a small rectangular bitmap usually used for denoting a mini‐
10       mized application.
11
12       It differs from a wxBitmap in always having a mask associated  with  it
13       for  transparent  drawing. On some platforms, icons and bitmaps are im‐
14       plemented identically, since there is no  real  distinction  between  a
15       wxBitmap  with a mask and an icon; and there is no specific icon format
16       on some platforms (X-based applications usually standardize on XPMs for
17       small  bitmaps  and  icons).  However, some platforms (such as Windows)
18       make the distinction, so a separate class is provided.
19
20       Remark: It is usually desirable to associate a pertinent  icon  with  a
21       frame.  Icons can also be used for other purposes, for example with wx‐
22       TreeCtrl and wxListCtrl. Icons  have  different  formats  on  different
23       platforms therefore separate icons will usually be created for the dif‐
24       ferent environments. Platform-specific methods for  creating  a  wxIcon
25       structure  are  catered  for, and this is an occasion where conditional
26       compilation will probably be required. Note that a  new  icon  must  be
27       created for every time the icon is to be used for a new window. In Win‐
28       dows, the icon will not be reloaded if it has  already  been  used.  An
29       icon  allocated  to  a frame will be deleted when the frame is deleted.
30       For more information please see overview_bitmap.
31
32       Predefined objects (include wx.hrl): ?wxNullIcon
33
34       See: Overview bitmap, Overview bitmap,  wxIconBundle,  wxDC:drawIcon/3,
35       wxCursor
36
37       This class is derived (and can use functions) from: wxBitmap
38
39       wxWidgets docs: wxIcon
40

DATA TYPES

42       wxIcon() = wx:wx_object()
43

EXPORTS

45       new() -> wxIcon()
46
47              Default ctor.
48
49              Constructs an icon object with no data; an assignment or another
50              member function such as wxBitmap:loadFile/3 must be called  sub‐
51              sequently.
52
53       new(Name) -> wxIcon()
54
55       new(Icon) -> wxIcon()
56
57              Types:
58
59                 Icon = wxIcon()
60
61              Copy ctor.
62
63       new(Name, Options :: [Option]) -> wxIcon()
64
65              Types:
66
67                 Name = unicode:chardata()
68                 Option =
69                     {type, wx:wx_enum()} |
70                     {desiredWidth, integer()} |
71                     {desiredHeight, integer()}
72
73              Loads an icon from a file or resource.
74
75              See: wxBitmap:loadFile/3
76
77       copyFromBitmap(This, Bmp) -> ok
78
79              Types:
80
81                 This = wxIcon()
82                 Bmp = wxBitmap:wxBitmap()
83
84              Copies bmp bitmap to this icon.
85
86              Under MS Windows the bitmap must have mask colour set.
87
88              See: wxBitmap:loadFile/3
89
90       destroy(This :: wxIcon()) -> ok
91
92              Destructor.
93
94              See overview_refcount_destruct for more info.
95
96              If the application omits to delete the icon explicitly, the icon
97              will be destroyed automatically by wxWidgets when  the  applica‐
98              tion exits.
99
100              Warning:  Do  not  delete an icon that is selected into a memory
101              device context.
102
103
104
105wxWidgets team.                    wx 2.2.2                          wxIcon(3)
Impressum