1wxJoystickEvent(3) Erlang Module Definition wxJoystickEvent(3)
2
3
4
6 wxJoystickEvent - Functions for wxJoystickEvent class
7
9 This event class contains information about joystick events, particu‐
10 larly events received by windows.
11
12 See: wxJoystick (not implemented in wx)
13
14 This class is derived (and can use functions) from: wxEvent
15
16 wxWidgets docs: wxJoystickEvent
17
19 Use wxEvtHandler:connect/3 with wxJoystickEventType to subscribe to
20 events of this type.
21
23 wxJoystickEvent() = wx:wx_object()
24
25 wxJoystick() =
26 #wxJoystick{type = wxJoystickEvent:wxJoystickEventType(),
27 pos = {X :: integer(), Y :: integer()},
28 zPosition = integer(),
29 buttonChange = integer(),
30 buttonState = integer(),
31 joyStick = integer()}
32
33 wxJoystickEventType() =
34 joy_button_down | joy_button_up | joy_move | joy_zmove
35
37 buttonDown(This) -> boolean()
38
39 Types:
40
41 This = wxJoystickEvent()
42
43 buttonDown(This, Options :: [Option]) -> boolean()
44
45 Types:
46
47 This = wxJoystickEvent()
48 Option = {but, integer()}
49
50 Returns true if the event was a down event from the specified
51 button (or any button).
52
53 buttonIsDown(This) -> boolean()
54
55 Types:
56
57 This = wxJoystickEvent()
58
59 buttonIsDown(This, Options :: [Option]) -> boolean()
60
61 Types:
62
63 This = wxJoystickEvent()
64 Option = {but, integer()}
65
66 Returns true if the specified button (or any button) was in a
67 down state.
68
69 buttonUp(This) -> boolean()
70
71 Types:
72
73 This = wxJoystickEvent()
74
75 buttonUp(This, Options :: [Option]) -> boolean()
76
77 Types:
78
79 This = wxJoystickEvent()
80 Option = {but, integer()}
81
82 Returns true if the event was an up event from the specified
83 button (or any button).
84
85 getButtonChange(This) -> integer()
86
87 Types:
88
89 This = wxJoystickEvent()
90
91 Returns the identifier of the button changing state.
92
93 The return value is where n is the index of the button changing
94 state, which can also be retrieved using GetButtonOrdinal() (not
95 implemented in wx).
96
97 Note that for n equal to 1, 2, 3 or 4 there are predefined
98 wxJOY_BUTTONn constants which can be used for more clarity, how‐
99 ever these constants are not defined for the buttons beyond the
100 first four.
101
102 getButtonState(This) -> integer()
103
104 Types:
105
106 This = wxJoystickEvent()
107
108 Returns the down state of the buttons.
109
110 This is a wxJOY_BUTTONn identifier, where n is one of 1, 2, 3,
111 4.
112
113 getJoystick(This) -> integer()
114
115 Types:
116
117 This = wxJoystickEvent()
118
119 Returns the identifier of the joystick generating the event -
120 one of wxJOYSTICK1 and wxJOYSTICK2.
121
122 getPosition(This) -> {X :: integer(), Y :: integer()}
123
124 Types:
125
126 This = wxJoystickEvent()
127
128 Returns the x, y position of the joystick event.
129
130 These coordinates are valid for all the events except wx‐
131 EVT_JOY_ZMOVE.
132
133 getZPosition(This) -> integer()
134
135 Types:
136
137 This = wxJoystickEvent()
138
139 Returns the z position of the joystick event.
140
141 This method can only be used for wxEVT_JOY_ZMOVE events.
142
143 isButton(This) -> boolean()
144
145 Types:
146
147 This = wxJoystickEvent()
148
149 Returns true if this was a button up or down event (not 'is any
150 button down?').
151
152 isMove(This) -> boolean()
153
154 Types:
155
156 This = wxJoystickEvent()
157
158 Returns true if this was an x, y move event.
159
160 isZMove(This) -> boolean()
161
162 Types:
163
164 This = wxJoystickEvent()
165
166 Returns true if this was a z move event.
167
168
169
170wxWidgets team. wx 2.3.1 wxJoystickEvent(3)