Objects

An Object a is a pointer to an object of type a. The a parameter is used
to encode the inheritance relation. When the type parameter is unit (), it denotes
an object of exactly that class, when the parameter is a type variable a, it
specifies an object that is at least an instance of that class. For example in
wxWindows, we have the following class hierarchy:

EvtHandler
|- Window
|- Frame
|- Control
|- Button
|- Radiobox

In wxHaskell, all the creation functions will return objects of exactly that
class and use the () type:

This means that we can use windowSetClientSize on any window, including
buttons and frames, but we can only use controlSetLabel on controls, not
includeing frames.

In wxHaskell, this works since a Frame () is actually a type synonym for
Window (CFrame ()) (where CFrame is an abstract data type). We can thus
pass a value of type Frame () to anything that expects some Window a.
For a button this works too, as it is a synonym for Control (CButton ())
which is in turn a synonym for Window (CControl (CButton ())). Note that
we can't pass a frame to something that expects a value of type Control a.
Of course, a Window a is actually a type synonym for EvtHandler (CWindow a).
If you study the documentation in Graphics.UI.WXH.WxcClasses closely, you
can discover where this chain ends :-).

Objects are not automatically deleted. Normally you can use a delete function
like windowDelete to delete an object. However, almost all objects in the
wxWindows library are automatically deleted by the library. The only objects
that should be used with care are resources as bitmaps, fonts and brushes.

Identifiers

When creating a new window you may specify idAny to let wxWindows
assign an unused identifier to it automatically. Furthermore, it can be
used in an event connection to handle events for any identifier.

Basic types

Booleans

Colors

Note: Haddock 0.8 and 0.9 doesn't support GeneralizedNewtypeDeriving. So, This class
doesn't have IArray class's unboxed array instance now. If you want to use this type
with unboxed array, you must write code like this.