SUI

From ESEwiki

Jump to: navigation, search

SUI stands for "Smart User Interfaces". This library tries to be a very high-level user interface builder, which replaces widget positioning by pure data modeling.

Of course, widget positioning may be important, but it's a separate concern and will be implemented later with some sort of "rules" (Strategy Design Pattern).

SUI has its roots in SmartFactor, an old project that was meant to work as well on low-end VT100 as on recent windowing systems without changing much of the code. To achieve such a feat, the system is split into two layers:

  • the abstract layer, used by clients, manages the user interface data;
  • the implementation layer, used by the abstract layer, manages the real interface display.

In fact, those two layers form a classic Bridge design pattern.

Note: SUI currently needs the latest SmartEiffel development version. You can check it out of the svn directory there.

Contents

The abstract layer

This layer has only abstract data management types:

There is also a special class, SUI, which manages the interface life cycle. It allows to select an implementation (via the creation of a factory) and start displaying data. This class is expanded for ease of use.

The implementation layer

This layer takes in charge the real widget positioning and data displaying. It is made of two parts:

  • the interface which is used by the abstract layer
  • the implementations, one for each kind of interface. Those implementations are: console, dialog, hexes, graphic, and web.

The Console layer

The console layer implements the toolkit using the standard text 80x25 character console in simple line mode.

See here for details.

The Dialog layer

The dialog layer implements the toolkit using a character console in screen mode, using the newt toolkit.

See here for details.

The Hexes layer

The hexes layer implements the toolkit using a character console in screen mode, using the curses/ncurses toolkit.

Hexes are smart curses :-)

See here for details.

The Graphic layer

The graphic layer implements the toolkit using a multi-platform windowing widget, Vision, which is provided by SmartEiffel.

See here for details.

The Cob layer

The cob layer implements the toolkit for multi-user usage via a web server.

See here for details

Personal tools