table of contents
other versions
- wheezy 1:15.b.1-dfsg-4+deb7u1
- wheezy-backports 1:17.3-dfsg-4~bpo70+1
- jessie 1:17.3-dfsg-4+deb8u1
- jessie-backports 1:19.2.1+dfsg-2~bpo8+1
- testing 1:19.2.1+dfsg-2
- unstable 1:19.2.1+dfsg-2
- experimental 1:19.3.1+dfsg-1
wx(3erl) | Erlang Module Definition | wx(3erl) |
NAME¶
wx - A port of wxWidgets.DESCRIPTION¶
A port of wxWidgets. This is the base api of wxWidgets. This module contains functions for starting and stopping the wx-server, as well as other utility functions. wxWidgets is object oriented, and not functional. Thus, in wxErlang a module represents a class, and the object created by this class has an own type, wxCLASS(). This module represents the base class, and all other wxMODULE's are sub-classes of this class. Objects of a class are created with wxCLASS:new(...) and destroyed with wxCLASS:destroy(). Member functions are called with wxCLASS:member(Object, ...) instead of as in C++ Object.member(...). Sub class modules inherit (non static) functions from their parents. The inherited functions are not documented in the sub-classes. This erlang port of wxWidgets tries to be a one-to-one mapping with the original wxWidgets library. Some things are different though, as the optional arguments use property lists and can be in any order. The main difference is the event handling which is different from the original library. See wxEvtHandler. The following classes are implemented directly as erlang types:DATA TYPES¶
- wx_colour() = {R::byte(), G::byte(), B::byte()} | wx_colour4():
-
- wx_colour4() = {R::byte(), G::byte(), B::byte(), A::byte()}:
-
- wx_datetime() = {{Year::integer(), Month::integer(), Day::integer()}, {Hour::integer(), Minute::integer(), Second::integer()}}:
-
In Local Timezone
- wx_enum() = integer():
-
Constant defined in wx.hrl
- wx_env() = #wx_env{}:
-
Opaque process environment
- wx_memory() = binary() | #wx_mem{}:
-
Opaque memory reference
- wx_object() = #wx_ref{}:
-
Opaque object reference
- wx_wxHtmlLinkInfo() = #wxHtmlLinkInfo{href=undefined | chardata() (see module unicode), target=undefined | chardata() (see module unicode)}:
-
- wx_wxMouseState() = #wxMouseState{x=undefined | integer(), y=undefined | integer(), leftDown=undefined | boolean(), middleDown=undefined | boolean, rightDown=undefined | boolean, controlDown=undefined | boolean(), shiftDown=undefined | boolean(), altDown=undefined | boolean(), metaDown=undefined | boolean(), cmdDown=undefined | boolean()}:
-
See #wxMouseState{} defined in wx.hrl
EXPORTS¶
parent_class(X1) -> term()
Starts a wx server.
Types:
Option = {debug, list() | atom()}
Starts a wx server. Option may be {debug, Level}, see debug/1.
Stops a wx server.
Gets this process's current wx environment. Can be sent to other processes to
allow them use this process wx environment.
See also: set_env/1.
Sets the process wx environment, allows this process to use another process wx
environment.
Returns the null object
Returns true if object is null, false otherwise
Returns the object type
Casts the object to class NewType. It is needed when using functions like
wxWindow:findWindow/2, which returns a generic wxObject type.
Batches all wx commands used in the fun. Improves performance of the
command processing by grabbing the wxWidgets thread so that no event
processing will be done before the complete batch of commands is invoked.
See also: foldl/3, foldr/3, foreach/2,
map/2.
Behaves like lists:foreach/2 but batches wx commands. See
batch/1.
Behaves like lists:map/2 but batches wx commands. See
batch/1.
Behaves like lists:foldl/3 but batches wx commands. See
batch/1.
Behaves like lists:foldr/3 but batches wx commands. See
batch/1.
Creates a memory area (of Size in bytes) which can be used by an external
library (i.e. opengl). It is up to the client to keep a reference to this
object so it does not get garbage collected by erlang while still in use by
the external library.
This is far from erlang's intentional usage and can crash the erlang emulator.
Use it carefully.
Returns the memory area as a binary.
Saves the memory from deletion until release_memory/1 is called. If
release_memory/1 is not called the memory will not be garbage collected.
Types:
Level = none | verbose | trace | driver |
integer()
Sets debug level. If debug level is 'verbose' or 'trace' each call is printed on
console. If Level is 'driver' each allocated object and deletion is printed on
the console.
Starts a wxErlang demo if examples directory exists and is compiled
AUTHORS¶
wx 0.99.2 |