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

NAME

6       wxCursor - Functions for wxCursor class
7

DESCRIPTION

9       A  cursor  is  a small bitmap usually used for denoting where the mouse
10       pointer is, with a picture that might indicate the interpretation of  a
11       mouse  click. As with icons, cursors in X and MS Windows are created in
12       a different manner. Therefore, separate cursors will be created for the
13       different environments. Platform-specific methods for creating a wxCur‐
14       sor object are catered for, and this is an occasion  where  conditional
15       compilation will probably be required (see wxIcon for an example).
16
17       A  single  cursor  object  may  be  used in many windows (any subwindow
18       type). The wxWidgets convention is to set the cursor for a  window,  as
19       in  X,  rather  than  to  set  it globally as in MS Windows, although a
20       global wx_misc:setCursor/1 function is also available  for  MS  Windows
21       use.
22
23       Creating a Custom Cursor
24
25       The following is an example of creating a cursor from 32x32 bitmap data
26       (down_bits) and a mask (down_mask) where 1 is black and 0 is white  for
27       the  bits,  and 1 is opaque and 0 is transparent for the mask. It works
28       on Windows and GTK+.
29
30       Predefined objects (include wx.hrl):
31
32       See: wxBitmap, wxIcon, wxWindow:setCursor/2, wx_misc:setCursor/1, ?wxS‐
33       tockCursor
34
35       This class is derived (and can use functions) from: wxBitmap
36
37       wxWidgets docs: wxCursor
38

DATA TYPES

40       wxCursor() = wx:wx_object()
41

EXPORTS

43       new() -> wxCursor()
44
45              Default constructor.
46
47       new(CursorName) -> wxCursor()
48
49       new(Image) -> wxCursor()
50
51       new(CursorId) -> wxCursor()
52
53              Types:
54
55                 CursorId = wx:wx_enum()
56
57              Constructs a cursor using a cursor identifier.
58
59       new(CursorName, Options :: [Option]) -> wxCursor()
60
61              Types:
62
63                 CursorName = unicode:chardata()
64                 Option =
65                     {type, wx:wx_enum()} |
66                     {hotSpotX, integer()} |
67                     {hotSpotY, integer()}
68
69              Constructs  a  cursor by passing a string resource name or file‐
70              name.
71
72              The arguments hotSpotX and hotSpotY are only used  when  there's
73              no  hotspot  info  in the resource/image-file to load (e.g. when
74              using wxBITMAP_TYPE_ICO under wxMSW or  wxBITMAP_TYPE_XPM  under
75              wxGTK).
76
77       destroy(This :: wxCursor()) -> ok
78
79              Destroys the cursor.
80
81              See reference-counted object destruction for more info.
82
83              A  cursor  can  be reused for more than one window, and does not
84              get destroyed when the window is destroyed.  wxWidgets  destroys
85              all  cursors  on  application exit, although it is best to clean
86              them up explicitly.
87
88       ok(This) -> boolean()
89
90              Types:
91
92                 This = wxCursor()
93
94              See: isOk/1.
95
96       isOk(This) -> boolean()
97
98              Types:
99
100                 This = wxCursor()
101
102              Returns true if cursor data is present.
103
104
105
106wxWidgets team.                    wx 2.1.4                        wxCursor(3)
Impressum