IRAF Object Manager

IRAF Object Manager


An Object Manager (OBM) user interface (UI) consists of one or more windows containing an arbitrary hierarchy of widgets. These widgets and their runtime actions are defined by an interpreted text program uploaded by the client application, which does not itself deal directly with the window user interface. Currently, this interpreted program is written in Tcl.

The object manager provides a higher level of abstraction for dealing with widgets and other UI objects. The main function of the object manager is to deliver messages to UI objects. Each instance of a widget, the client programs, and the OBM itself are objects in the UI. The UI contains other types of objects however, including the client object (client application), the server object (the object manager itself), and the application specific UI parameters, each of which is an object with a callback list of UI procedures to be called when the parameter value changes. All of these UI objects can receive messages and take actions as a result. Messages may come from the client application, or as a result of actions executed by the interpreted UI code in response to graphics events.

Object classes:

Client           the client application
Server           the object manager itself
Widget           widgets
ParameterUI      control parameter
Gterm            graphics/imaging widget
Graphics Markers  marker widgets
Image Client     imageing widget

Various Xt and Athena widgets {box, shell, label, command, text, list, etc.}

To locate specific IRAF GUI commands quickly, here is an

        alphabetized list of IRAF GUI commands

Sophisticated graphics applications will download a UI during initialization to define a custom graphics user interface. This is done by sending a message to the object manager. Naive applications assume a simple graphics terminal and do not download a UI; in this case, a default UI is created for the application when the UI is enabled with ObmEnable. The default UI is a single top level shell window containing a single gterm (graphics terminal) widget.

        reset-server
        appInitialize  appname,appclass,resources
        createObjects  [resource-name]
        (UI specific code)
        activate

A UI specification consists of a sequence of commands to be executed by the server object. This is downloaded by the client as a message for the server object. The commands should include "reset-server" (this must be the first executable command), "appInitialize" (defines the UI objects and their resources), and "createObjects" (creates the objects and the widget tree), followed by any UI specific commands to define and register UI callback procedures. Finally, "activate" is executed to activate the new user interface.

Class descriptors for all UI object classes. In the following, only the class initializer function needs to be set statically, since the class initializer function will initialize the remaining fields of the class descriptor at run time when the object manager is opened.

    Server     Client     Parameter     Gterm      Core
    Object     Widget     Command       Grip       Label
    List       Scrollbar  StripChart    Toggle     SimpleMenu
    Sme        SmeBSB     SmeLine       MenuButton AsciiText
    Box        Dialog     Form          Paned      Viewport

    Shell
    OverrideShell
    WMShell    
    TransientShell
    TopLevelShell
    ApplicationShell