GUI: Graphical User Interface
Description:
The GUI is used to simplify use of cli (command line interface). It is a client and server application. Any command a user issues from the GUI will be sent to a server via a socket. The server provides an interface between clients (GUI) and one or more running copies of cli.
cli_client.tcl (written in tcl/tk) -- client
use:
Call cli_client.tcl, a graphical user interface will appear.
features:
When started up, the GUI will load default user predefined variables and classes to run a simulation. Default values are stored in a file .clirc in standard cli script syntax. Next, the GUI queries available classes from cli through the server and displays them as a list. The user can then display all available methods for a class by double clicking on any class name. By double clicking on any method name, a window for executing the method is displayed.This window will show any arguments needed, and possible candidates for these arguments, based on type. A window to generate new instances of matching types is also provided for each argument. Alternatively, the user can manually type any commands to execute.
GUI provides a history feature that will show all commands the user previously typed
The GUI window is divided into several areas:
* menu area
* available classes
* available methods
* command input
* cli output display
* command buttons
The menu presently contains three choices, 'run script', 'history', and 'exit'. 'Run script' will allow the user to choose a script to run, history will bring up a history window, and 'exit' will end the program.
The available classes area shows all classes currently available in cli.
The available methods area shows the available methods for the currently selected class.
The command input area allows the user to manually isssue any command to cli.
Any output from cli is displayed in the cli output area.
A 'run form script' button will bring up a directory window to let the user choose which script to run. A click on that file will start the script.
The button 'show created instance' will display all objects (include global variables).
The button 'show graph' will bring up a new window which lets users do:
'Open File': request a specifical file from the server and display it on the client side.
'Select outputStream': display all the RecordOutputStream and its fields.
a user can select the RecordOutputStream and fields from cli and display it on the client side.
a new socket is created to communicate between cli and the graphical display program.
files (in addition to regular cli):
cli_client.tcl -- GUI
cli_server.h -- header file for server.cc.
server.cc (written in C++) -- server
The connection between server and cli are named pipes, the connection
between server and cli_client.tcl is a socket. The connections for
displaying graphic between cli and GUI are sockets.