Object I/O

From Clean
Revision as of 11:41, 5 July 2010 by Bas Lijnse (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Object I/O Library is a collection of functions and data structures to create Clean programs that have a Graphical User Interface (GUI). The Object I/O Library takes care of all low-level event handling, management of OS resources, and so on. You, the programmer, define the GUI-elements. This is done by glueing the appropriate building blocks that can be found in the Object I/O Library. You can also define your own building blocks. These fit seamlessly with the existing components. The type system of Clean guides you by allowing only legal compositions of components. This implies that it is impossible to write ill-constructed programs. You can customise the behaviour of interactive components by adding functions to them. The evaluation of these functions is handled completely by the Object I/O system, you don't have to do anything for this.

The Object I/O Library 1.2 is a huge library offering the specification of GUI-elements and lightweight processes on a very high level of abstraction yet it results in efficient applications. Below some examples are given that are part of the distribution. A real-world example of an Object I/O application is the Integrated Development Environment, the Clean IDE, which is entirely written in Clean.

The Object I/O Library 1.2 is currently only available for the Wintel platform. We will make a port of this library to the Mac as well. An earlier version 1.1 is already available for the Macintosh (both PPC and 68k). There are no plans to make a port of version 1.2 for the other platfoms.

To help you create your own GUI programs, the distribution comes with a comprehensive tutorial. In this tutorial the basic ideas are explained. It contains a lot of small examples that illustrate the various aspects of the Object I/O Library. In addition, it contains a chapter that covers the TCP library.

Features

The most important features of the Object I/O Library are:

  • Orthogonal treatment of all Graphical User Interface element definitions, including windows, dialogs, buttons, scroll bars and the like;
  • Easy composition operators to construct new GUI elements from existing ones;
  • You can define your own GUI elements as first class citizens;
  • All GUI elements can be added and removed dynamically;
  • Interactive processes can be added and removed dynamically;
  • Interactive processes have specialised document interfaces, such as MDI and SDI;
  • Message passing of arbitrary data and function types;
  • Each GUI element can have a private local state;
  • Local state can be shared between elements of different device type;
  • Programming of GUI elements in an object oriented style;
  • Flexible layout handling of controls in windows and dialogues;
  • Clipboard handling of text;
  • Bitmap handling;
  • Timers can be added to other devices as element instance;

Screenshots

Below are a couple of screen dumps of demo applications making use of the Object I/O library. The demos are included in the distribution. If you want to see a bigger example, have a look at the Clean IDE. Bounce.jpg Slidergame.jpg ScrabbleObjIO.jpg

Personal tools