A port of wxWidgets.
This is the base api of wxWidgets. This module contains functions for starting and stopping the wx-server, and other utility functions.
wxWidgets is object oriented, and not functional. Where an erlang module represents a class, and the object created by this class have 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 inherits (non static) functions from it's 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, optional arguments
uses 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:
wxPoint={x,y},wxSize={w,h},wxRect={x,y,w,h},wxColour={r,g,b [,a]},wxString=[integer],
wxGBPosition={r,c},wxGBSpan={rs,cs},wxGridCellCoords={r,c}.
Where all strings are decoded/encoded as UTF32 in native format.
wxWidgets uses a process specific environment, which is created by wx:new(),
to allow usage from other procesess use get_env/1 and set_env/0.
abstract datatype: colour()
A 3 or 4 tuple: {R,G,B,A} or as argument {R,G,B} is also accepted where each colour channal is a an integer between 0-255.
abstract datatype: datetime()
{{Year,Month,Day}, {Hour,Minute,Second}} in local timezone.
abstract datatype: mouseState()
See #wxMouseState{} defined in wx.hrl
abstract datatype: wxObject()
Opaque object
abstract datatype: wx_env()
Wx process enviroment
abstract datatype: wx_mem()
Wx memory area
| batch/1 | Batches all |
| create_memory/1 | Creates a memory area (of Size in bytes) which can be used by an external library (i.e. |
| debug/1 | Sets debug level, if debug is verbose or trace each call is printed on console. |
| destroy/0 | Stops a wx server. |
| foldl/3 | Behaves like lists:foldl/3 but batches wx commands see batch/1. |
| foldr/3 | Behaves like lists:foldr/3 but batches wx commands see batch/1. |
| foreach/2 | Behaves like lists:foreach/2 but batches wx commands see batch/1. |
| getObjectType/1 | Returns the object type. |
| get_env/0 | Get this process current wx environment. |
| get_memory_bin/1 | Returns the memory area as a binary. |
| is_null/1 | Returns true if object is null, false otherwise. |
| map/2 | Behaves like lists:map/2 but batches wx commands see batch/1. |
| new/0 | Starts a wx server. |
| null/0 | returns the null object. |
| set_env/1 | Sets the process wx environment, allows this process to use another process wx environment. |
| typeCast/2 | Casts the object to class NewType. |
batch(Fun::function()) -> term()
Batches all
See also: foldl/3, foldr/3, foreach/2, map/2.
create_memory(Size::integer()) -> wx_memory()
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 an 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.debug(Level::atom()) -> ok
Sets debug level, if debug is verbose or trace each call is printed on console
destroy() -> ok
Stops a wx server.
foldl(Fun::function(), Acc::term(), List::list()) -> term()
Behaves like lists:foldl/3 but batches wx commands see batch/1.
foldr(Fun::function(), Acc::term(), List::list()) -> term()
Behaves like lists:foldr/3 but batches wx commands see batch/1.
foreach(Fun::function(), List::list()) -> ok
Behaves like lists:foreach/2 but batches wx commands see batch/1.
getObjectType(Wx_ref::wxObject()) -> atom()
Returns the object type
get_env() -> wx_env()
Get this process current wx environment. Can be sent to other processes be allow them use wx functionality.
See also: set_env/1.
get_memory_bin(Wx_mem::wx_memory()) -> binary()
Returns the memory area as a binary.
is_null(Wx_ref::wxObject()) -> boolean()
Returns true if object is null, false otherwise
map(Fun::function(), List::list()) -> list()
Behaves like lists:map/2 but batches wx commands see batch/1.
new() -> wxObject()
Starts a wx server.
null() -> wxObject()
returns the null object
set_env(Wx_env::wx_env()) -> ok
Sets the process wx environment, allows this process to use another process wx environment.
typeCast(Old::wxObject(), NewType::atom()) -> wxObject()
Casts the object to class NewType. It is needed when using functions like wxWindow:findWindow/2, which returns an generic wxObject type.
Generated by EDoc, May 26 2008, 12:35:47.