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

NAME

6       wx_misc - Miscellaneous functions.
7

DESCRIPTION

9       Miscellaneous functions.
10

EXPORTS

12       displaySize() -> {Width :: integer(), Height :: integer()}
13
14              Returns the display size in pixels.
15
16              Note: Use of this function is not recommended in the new code as
17              it only works for the primary display.  Use  wxDisplay:getGeome‐
18              try/1 to retrieve the size of the appropriate display instead.
19
20              Either  of  output pointers can be NULL if the caller is not in‐
21              terested in the corresponding value.
22
23              See: wxGetDisplaySize() (not implemented in wx), wxDisplay
24
25       setCursor(Cursor) -> ok
26
27              Types:
28
29                 Cursor = wxCursor:wxCursor()
30
31              Globally sets the cursor; only has an effect on Windows, Mac and
32              GTK+.
33
34              You  should  call this function with wxNullCursor to restore the
35              system cursor.
36
37              See: wxCursor, wxWindow:setCursor/2
38
39       getKeyState(Key) -> boolean()
40
41              Types:
42
43                 Key = wx:wx_enum()
44
45              For normal keys, returns true if the specified key is  currently
46              down.
47
48              For  togglable  keys  (Caps Lock, Num Lock and Scroll Lock), re‐
49              turns true if the key is toggled such that its LED indicator  is
50              lit.  There  is  currently no way to test whether togglable keys
51              are up or down.
52
53              Even though there are virtual key codes defined for  mouse  but‐
54              tons, they cannot be used with this function currently.
55
56              In  wxGTK,  this  function  can  be only used with modifier keys
57              (WXK_ALT, WXK_CONTROL and WXK_SHIFT) when not using X11  backend
58              currently.
59
60       getMousePosition() -> {X :: integer(), Y :: integer()}
61
62              Returns the mouse position in screen coordinates.
63
64       getMouseState() -> wx:wx_wxMouseState()
65
66              Returns the current state of the mouse.
67
68              Returns  a  wx_wxMouseState() instance that contains the current
69              position of the mouse pointer in screen coordinates, as well  as
70              boolean  values  indicating the up/down status of the mouse but‐
71              tons and the modifier keys.
72
73       setDetectableAutoRepeat(Flag) -> boolean()
74
75              Types:
76
77                 Flag = boolean()
78
79              Don't synthesize KeyUp events holding down a key  and  producing
80              KeyDown events with autorepeat.
81
82              On by default and always on in wxMSW.
83
84       bell() -> ok
85
86              Ring the system bell.
87
88              Note:  This  function  is categorized as a GUI one and so is not
89              thread-safe.
90
91       findMenuItemId(Frame, MenuString, ItemString) -> integer()
92
93              Types:
94
95                 Frame = wxFrame:wxFrame()
96                 MenuString = ItemString = unicode:chardata()
97
98              Find a menu item identifier associated with  the  given  frame's
99              menu bar.
100
101       findWindowAtPoint(Pt) -> wxWindow:wxWindow()
102
103              Types:
104
105                 Pt = {X :: integer(), Y :: integer()}
106
107              Find  the  deepest  window at the given mouse position in screen
108              coordinates, returning the window if found, or NULL if not.
109
110              This function takes child windows at the given position into ac‐
111              count even if they are disabled. The hidden children are however
112              skipped by it.
113
114       beginBusyCursor() -> ok
115
116       beginBusyCursor(Options :: [Option]) -> ok
117
118              Types:
119
120                 Option = {cursor, wxCursor:wxCursor()}
121
122              Changes the cursor to the given cursor for all  windows  in  the
123              application.
124
125              Use  endBusyCursor/0  to  revert the cursor back to its previous
126              state. These two calls can be nested, and a counter ensures that
127              only the outer calls take effect.
128
129              See: isBusy/0, wxBusyCursor (not implemented in wx)
130
131       endBusyCursor() -> ok
132
133              Changes  the cursor back to the original cursor, for all windows
134              in the application.
135
136              Use with beginBusyCursor/1.
137
138              See: isBusy/0, wxBusyCursor (not implemented in wx)
139
140       isBusy() -> boolean()
141
142              Returns true if between two  beginBusyCursor/1  and  endBusyCur‐
143              sor/0 calls.
144
145              See: wxBusyCursor (not implemented in wx)
146
147       shutdown() -> boolean()
148
149       shutdown(Options :: [Option]) -> boolean()
150
151              Types:
152
153                 Option = {flags, integer()}
154
155              This  function  shuts  down or reboots the computer depending on
156              the value of the flags.
157
158              Note: Note that performing the shutdown requires the correspond‐
159              ing  access  rights (superuser under Unix, SE_SHUTDOWN privilege
160              under Windows) and that this function is only implemented  under
161              Unix and MSW.
162
163              Return: true on success, false if an error occurred.
164
165       shell() -> boolean()
166
167       shell(Options :: [Option]) -> boolean()
168
169              Types:
170
171                 Option = {command, unicode:chardata()}
172
173              Executes a command in an interactive shell window.
174
175              If no command is specified, then just the shell is spawned.
176
177              See: wxExecute() (not implemented in wx), Examples
178
179       launchDefaultBrowser(Url) -> boolean()
180
181              Types:
182
183                 Url = unicode:chardata()
184
185       launchDefaultBrowser(Url, Options :: [Option]) -> boolean()
186
187              Types:
188
189                 Url = unicode:chardata()
190                 Option = {flags, integer()}
191
192              Opens the url in user's default browser.
193
194              If the flags parameter contains wxBROWSER_NEW_WINDOW flag, a new
195              window is opened for the URL (currently this is  only  supported
196              under Windows).
197
198              And  unless  the flags parameter contains wxBROWSER_NOBUSYCURSOR
199              flag, a busy cursor is shown while the browser is being launched
200              (using wxBusyCursor (not implemented in wx)).
201
202              The parameter url is interpreted as follows:
203
204              Returns true if the application was successfully launched.
205
206              Note:  For some configurations of the running user, the applica‐
207              tion which is launched to open the given URL may  be  URL-depen‐
208              dent  (e.g.  a  browser may be used for local URLs while another
209              one may be used for remote URLs).
210
211              See: wxLaunchDefaultApplication() (not implemented in wx), wxEx‐
212              ecute() (not implemented in wx)
213
214       getEmailAddress() -> unicode:charlist()
215
216              Copies  the  user's  email  address into the supplied buffer, by
217              concatenating the values returned  by  wxGetFullHostName()  (not
218              implemented in wx) and getUserId/0.
219
220              Return: true if successful, false otherwise.
221
222       getUserId() -> unicode:charlist()
223
224              This  function  returns the "user id" also known as "login name"
225              under Unix (i.e.
226
227              something like "jsmith"). It  uniquely  identifies  the  current
228              user  (on this system). Under Windows or NT, this function first
229              looks in the environment variables USER and LOGNAME; if  neither
230              of  these is found, the entry UserId in the wxWidgets section of
231              the WIN.INI file is tried.
232
233              Return: The login name if successful or an empty  string  other‐
234              wise.
235
236              See: wxGetUserName() (not implemented in wx)
237
238       getHomeDir() -> unicode:charlist()
239
240              Return the (current) user's home directory.
241
242              See:  wxGetUserHome()  (not  implemented in wx), wxStandardPaths
243              (not implemented in wx)
244
245       newId() -> integer()
246
247              Deprecated: Ids generated by it can conflict with  the  Ids  de‐
248              fined  by  the  user  code, use wxID_ANY to assign ids which are
249              guaranteed to not conflict with the  user-defined  ids  for  the
250              controls  and  menu items you create instead of using this func‐
251              tion.
252
253              Generates an integer identifier unique to this run of  the  pro‐
254              gram.
255
256       registerId(Id) -> ok
257
258              Types:
259
260                 Id = integer()
261
262              Ensures  that Ids subsequently generated by newId/0 do not clash
263              with the given id.
264
265       getCurrentId() -> integer()
266
267              Returns the current id.
268
269       getOsDescription() -> unicode:charlist()
270
271              Returns the string containing the  description  of  the  current
272              platform in a user-readable form.
273
274              For  example,  this function may return strings like "Windows 10
275              (build 10240), 64-bit edition" or "Linux 4.1.4 i386".
276
277              See: wxGetOsVersion() (not implemented in wx)
278
279       isPlatformLittleEndian() -> boolean()
280
281              Returns true if the current platform is little  endian  (instead
282              of big endian).
283
284              The check is performed at run-time.
285
286       isPlatform64Bit() -> boolean()
287
288              Returns  true if the operating system the program is running un‐
289              der is 64 bit.
290
291              The check is performed at run-time and may differ from the value
292              available at compile-time (at compile-time you can just check if
293              sizeof(void*) == 8) since the program could be running in emula‐
294              tion  mode or in a mixed 32/64 bit system (bi-architecture oper‐
295              ating system).
296
297              Note: This function is not 100% reliable on some  systems  given
298              the fact that there isn't always a standard way to do a reliable
299              check on the OS architecture.
300
301
302
303wxWidgets team.                    wx 2.3.1                         wx_misc(3)
Impressum