wxEuphoria is designed to be very similar to other Euphoria GUI libraries (i.e., Win32Lib). Although I recommend downloading the wxWidgets documentation, a program written in wxEuphoria will take a different form than a C++ program written using wxWidgets. In wxEuphoria, you don't have to worry about creating a class derived from wxApp, or overloading an OnInit() function. All you need to do is to create your controls, define and connect your event handlers, and start the wxEuphoria event loop. Below is a basic outline of what a wxEuphoria program might look like:
[include statements][create the controls]
[event handlers and other code]
wxMain()
Here is the classic 'Hello World!' program written in wxEuphoria (see hello_world.exw):
include wxEuphoria.e include wxGraphics.econstant HelloFrame = create( wxFrame, {0, -1, "My First Message", -1, -1, 200, 100} ), HelloWin = create( wxPanel, {HelloFrame})
procedure onPaint_HelloWin( atom this, atom event, atom it, atom event_type ) wx_puts( this, "Hello, World!") end procedure set_event_handler( HelloWin, get_id(HelloWin), wxEVT_PAINT, routine_id( "onPaint_HelloWin" ))
wxMain( HelloFrame )
One thing to remember is that similar classes are grouped together in their own include files. If you want to use a particular class, you need to include the correct file. The documentation for each class should indicate the name of its file. In this case, we used wx_puts(), which is found in the documentation under Graphics (Drawing, Text, Fonts), for which the include file is wxGraphics.e.
Notice the syntax of the calls to create(). This is the standard function that should be called to create an object of almost any wxEuphoria class that is wrapped. The class documentation should indicate what the second parameter (always a sequence) should be. Many classes have optional parameters. You can omit these parameters if the default values are acceptable. Note that if the third and fourth parameters are optional, you can't specify the fourth and not the third--i.e., you can't skip parameters in the middle of the list.
Unfortunately, all functions and classes haven't been documented as consistently or as thourough as they should be. If something in particular doesn't make sense, please ask (best is the Euphoria forum), and I'll try to correct the situation. Contributions, in the form of code and/or documentation is also welcomed and encouraged (please see the developer's download for guidelines).