PltScheme provides a cross-platform GUI toolkit called MrEd. MrEd builds upon the PltScheme's default object system, contained in the class.ss library in MzLib?.
Code to create a window and display the text "Hello World!" is:
Like most GUI systems, MrEd consists of a hierarchy of graphical containers and containees.
A frame is a top-level container (meaning it has no parent container) that corresponds to a window. The code to create a frame with the given label (titlebar), height, and width is:
A pane is another container that exists only to manage the layout of its children objects. In this example we don't need a pane, as with only one child, the message, there is no layout to manage. More complex examples will need to use panes. The code is create a pane is given below. Note that the parent is set to the frame.
(definethe-pane
(newpane%
(parentthe-frame)))
The message is an containee object that displays a text string. The code to create it is given below. Note how the parent is set to the pane. We could change the pane to the frame and this example would still work.