summaryrefslogtreecommitdiff
path: root/lib/wx/doc/src/wxCursor.xml
blob: 8dc51ba8b0fba6785e8a7deb1750529bdc4b2573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxCursor</title>
</header>
<module>wxCursor</module>
<modulesummary>Functions for wxCursor class</modulesummary>
<description><p>A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click. As with icons, cursors in X and MS Windows are created in a different manner. Therefore, separate cursors will be created for the different environments. Platform-specific methods for creating a <seeerl marker="wxCursor"><c>wxCursor</c></seeerl> object are catered for, and this is an occasion where conditional compilation will probably be required (see <seeerl marker="wxIcon"><c>wxIcon</c></seeerl> for an example).
      </p><p>A single cursor object may be used in many windows (any subwindow type). The wxWidgets convention is to set the cursor for a window, as in X, rather than to set it globally as in MS Windows, although a global <seemfa marker="wx_misc#setCursor/1"><c>wx_misc:setCursor/1</c></seemfa> function is also available for MS Windows use.
      </p><p>Creating a Custom Cursor</p> <p>The following is an example of creating a cursor from 32x32 bitmap data (down_bits) and a mask (down_mask) where 1 is black and 0 is white for the bits, and 1 is opaque and 0 is transparent for the mask. It works on Windows and GTK+.
      </p>   <p>Predefined objects (include wx.hrl):
      </p><p>See: <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>, <seeerl marker="wxIcon"><c>wxIcon</c></seeerl>, <seemfa marker="wxWindow#setCursor/2"><c>wxWindow:setCursor/2</c></seemfa>, <seemfa marker="wx_misc#setCursor/1"><c>wx_misc:setCursor/1</c></seemfa>, ?wxStockCursor
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_cursor.html">wxCursor</url></p>
  </description>
<datatypes><datatype><name name="wxCursor"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
  
    <name name="new" arity="1" clause_i="3" since=""/>
    <fsummary>Constructs a cursor using a cursor identifier. </fsummary>
    <desc><p>Constructs a cursor using a cursor identifier. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Constructs a cursor by passing a string resource name or filename. </fsummary>
    <desc><p>Constructs a cursor by passing a string resource name or filename. 
      </p><p>The arguments <c>hotSpotX</c> and <c>hotSpotY</c> are only used when there's no hotspot info in the resource/image-file to load (e.g. when using <c>wxBITMAP_TYPE_ICO</c> under wxMSW or <c>wxBITMAP_TYPE_XPM</c> under wxGTK).
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destroys the cursor. </fsummary>
    <desc><p>Destroys the cursor. 
      </p><p>See reference-counted object destruction for more info.
      </p><p>A cursor can be reused for more than one window, and does not get destroyed when the window is destroyed. wxWidgets destroys all cursors on application exit, although it is best to clean them up explicitly. 
      </p></desc>
  </func>
  
  <func>
    <name name="ok" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>isOk/1</c></fsummary>
    <desc><p>See: <seemfa marker="#isOk/1"><c>isOk/1</c></seemfa>.</p>
    </desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if cursor data is present. </fsummary>
    <desc><p>Returns true if cursor data is present. 
      </p></desc>
  </func>
  </funcs>
</erlref>