The YAAF libraries are a C++ application framework used for building application for the Macintosh, Microsoft Windows 95/98 and Windows NT, and for X Windows. In order to allow application developers to write code which is portable across these separate platforms, the YAAF libraries impose a simple event driven model for application development.

YAAF is built fundamentally on the concept of a 'view'; this is a part of a window which contains either a single control or a grouping of controls. The basic XGView class is used to build controls, panels, and all other interface elements; in that sense, they are equivalent to an X 'widget'. (In fact, YAAF replaces the xt intrinsics library to provide widget support, rather than being built on top of Motif or another widget framework. However, given the way views are constructed, it may be possible for an enterprising individual to rewrite the view framework to use a third-party widget set.)

Where the Framework Fits

The YAAF libraries are not intended to provide a complete API for developing a full fledged application. Instead, YAAF currently only covers those classes necessary to create a user interface front-end: the 90% solution. In the future perhaps separate modules will be added to encapsulate other features, such as TCP/IP connectivity or real-time video playback, but it's invisioned that these would be packaged as separate libraries.

On the Macintosh and on Microsoft Windows, the YAAF library sits between the application and the user interface routines on the target environment. As the YAAF library doesn't encapsulate the entire API, there are still substantial components of the application which will need to talk to the underlying API; in these cases convenient C preprocessor macros OPT_MACOS, OPT_WINOS and OPT_XWIN are provided to help differentiate between different versions for different target environments.

Because YAAF provides the same functionality of the X intrinsics libraries, YAAF sits directly on top of XLib. XLib drawing routines are encapsulated by the XGDraw class, so unlike X, there is little need to use the XLib drawing routines for drawing the contents of a widget. (You can do it; it's just not the prefered way of doing things currently in the YAAF libraries.)

The elements of the YAAF Library

The YAAF library can be broken up into 7 major sections. Each section is more or less self-contained pieces of code which could be broken out and used separately. These 'modules' are:

> Suport Routines

> These are miscellaneous support routines which do not fit into any other category. These underly most of the YAAF libraries and provide diverse services including encapsulating Macintosh Handles (and providing simulated handles for other platforms). The types of services provided are:

> - Error Management
> - Data Conversion Utilities
> - Cursor Utilities
> - String, Array and Memory Classes

> Event Management

> These are classes which provide various mechanisms for dispatching messages to different components. There are three supported mechanisms for dispatching messages. The first is the "broadcast" mechanism, where events are globally broadcast to all interested receivers. The second is the "send/receive" where classes interested in receiving messages from a particular sender can ask to receive messages from it. And the third is a hierarchical 'tree' style class which supports message passing to views and windows. This third mechanism supports 'keyboard' focus selection and window selection, so that messages go to the active window.

> Menu Management

> These classes encapsulate the functionality of creating, modifying, and deleting menus from the menu bar at the top of the screen or window.

> View Management

> Views make the core user interface element of the YAAF library, and are the equivalent of the basic 'xt' intrinsics library of YAAF. These classes provide for view positioning maintanance, encapsulate view creation and destruction, and also encapsulate the drawing routines commonly used to update the contents of a YAAF-based application.

> Application Management

> These classes take care of window management (including dealing with pop-up windows), and the main application event loop.

> Control Management

> These classes are all descendants of the XGView class and encapsulate Macintosh and Microsoft Windows controls, such as buttons and scrollbars. (On X, these provide the equivalent functionality.)

> Dialog Management

> These classes build on top of the window manager all the elements necessary for maintaining both modal and modeless dialogs.

Building a YAAF-based Application

###To be done. Include instructions for installing on Mac, Windows and X, and for building the sample applications.