head	1.4;
access;
symbols;
locks; strict;
comment	@% @;


1.4
date	92.10.28.07.12.43;	author lacey;	state Exp;
branches;
next	1.3;

1.3
date	92.10.28.01.35.39;	author lacey;	state Exp;
branches;
next	1.2;

1.2
date	92.10.27.20.59.46;	author lacey;	state Exp;
branches;
next	1.1;

1.1
date	92.10.25.18.46.48;	author lacey;	state Exp;
branches;
next	;


desc
@@


1.4
log
@*** empty log message ***
@
text
@%*****************************************************************************
% Remember, you need to be as detailed as possible in the description
% of the modules in order to facilitate the coding task. Do not leave any 
% room for ambiguity.
%*****************************************************************************
%
% For each module and major submodule complete the following
% section and subsections
%
\subsection{Graphical User Interface}

% 
% Include a data flow diagram for this module
%
\subsubsection{Data Flow Diagram}

The data used by the graphical user interface is all local, other than
the window widgets themselves and the global task list.  Essentially
information flows from the GUI to the database, and vice-versa, and
all that is passed is the information for a single task.  All other
``data'' is essentially just a control signal to start something
processing.

%
% Include a Structure Chart for this module
%
\subsubsection{Structure Chart}

Almost all of the routines in the graphical user interface are
independent of one another, so a structure chart would be of very
little practical value.

%
% Include a processing narrative for this module
%
\subsubsection{Narrative}

The graphical user interface (GUI) will process interactive user
requests that are activated using the keyboard and mouse.  The
interface itself has a main screen, the \pscreen, which is used along
with the \tiscreen\/ throughout the entire task entry process.

There are items available on the \pscreen\/ menus to load and save
files, generate PERT and Gantt charts, analyze the task network, and
export the task list to a \LaTeX\ file.

All processing happens as a result of callbacks to functions
originally created by the Sun OpenWindows Developer Guide, and
subsequently modified by our development team.  The callbacks are
invoked based upon user input.  The callbacks are essentially
independent of one another, and there is exactly one for each element
(button, menu item, etc.) of the user interface. 

%
% Include a PDL pseudocode description for this module
%
\subsubsection{PDL Description}

PDL for the major callbacks of the graphical user interface follow.
Each callback represents a button, menu item, or other type of item in
the user interface that the user has control over.

\begin{verbatim}

PROCEDURE store-data;
(* Called after they have entered task information into the
task-window *)
INTERFACE task-list;

TYPE task-info IS INSTANCE OF task-info-type;

   CALL add-task-to-list PROCEDURE WITH task-list, task-info;

END store-data



PROCEDURE initialize-task-window;
(* Called when they want to view a task *)
INTERFACE task;

   FOR each element of the task-window
      fill task-window entry with data from task;

END initialize-task-window



PROCEDURE popup-file-window;
(* Called from load-file-callback and save-file-callback *)
INTERFACE RETURNS file-name;

   Pop-up window and wait for user to select file and then OKAY button;

   RETURN file-name;

END read-file-callback




PROCEDURE load-file-callback;
(* Called when load file menu item is selected and they enter a file
name into the file load window *)
TYPE file-name IS STRING(60);

   CALL popup-file-window WITH file-name;
   CALL load-file PROCEDURE WITH file-name;

END read-file-callback




PROCEDURE store-file-callback;
(* Called when save file menu item is selected and they enter a file
name into the file store window *)
TYPE file-name IS STRING(60);

   CALL popup-file-window WITH file-name;
   CALL store-file PROCEDURE WITH file-name;

END read-file-callback



PROCEDURE pert-popup;
(* Called when the PERT chart option is selected off of the menu *)

   CALL get-pert-formatting-info PROCEDURE WITH task-list;
   Pop up PERT window;
   CALL display-pert-chart PROCEDURE WITH task-list;

END PERT-popup




PROCEDURE display-pert-chart;
(* actually draws the PERT chart in the PERT chart window *)
INTERFACE task-list;
TYPE task IS TASK;

   FOR each task in task-list
      CALL draw-pert-box PROCEDURE WITH task

END display-pert-chart




PROCEDURE draw-pert-box;
(* draws a single pert box *)
INTERFACE task;

   CALL XDrawRect with task.x, task.y, TASK-BOX-SIZE;
   Write strings out inside of rect;

END draw-pert-box;


PROCEDURE latex-pert-generate-callback;
(* called when option to generate LaTeX code for a PERT chart is
selected *)

   CALL generate-pert-chart WITH filename;

END latex-pert-generate-callback;





PROCEDURE latex-gantt-generate-callback;
(* called when option to generate LaTeX code for a Gantt chart is
selected *)

   CALL generate-gantt-chart WITH filename;

END latex-gantt-generate-callback;




PROCEDURE gantt-popup;
(* Called when the Gantt chart option is selected off of the menu *)

   CALL get-gantt-formatting-info PROCEDURE WITH task-list;
   Pop up Gantt window;
   CALL display-gantt-chart PROCEDURE WITH task-list;

END gantt-popup




PROCEDURE display-gantt-chart;
(* actually draws the gantt chart in the gantt chart window *)
INTERFACE task-list;
TYPE task IS TASK;

   FOR each task in task-list
      CALL draw-gantt-box PROCEDURE WITH task

END display-gantt-chart




PROCEDURE draw-gantt-bar;
(* draws a single Gantt bar *)
INTERFACE task;

   CALL XDrawRect with task.x, task.y, TASK-BAR-HEIGHT;

END draw-gantt-box;

\end{verbatim}

%
% Include a description of the interfaces for this module.
% This should include a list of data elements passed between
% modules.  The data elements described here should either be
% described in the next subsection or in the relevant owner's
% data dictionary
%
\subsubsection{Internal Interfaces}

The callbacks in the graphical user interface are largely independent
and do not require any interface to each other.  They are called based
on user actions, and do not call each other directly.  Rather, when
they are called, they call procedures in other modules to process the
user action.  The few exceptions are those routines like the
store-data procedure described above, which actually do processing of
some type other than calling other procedures.

%
% Include a data dictionary for this module.  The format should be:
%  
% Name: (this is the name of the data item)
% Aliases: (this is a list of aliases, if any)
% Where Used/ How Used: (this is a paired list of where the item is
%     used and how it is used
% Description: (this is a demarco description of the data item)
%
\subsubsection{Data Dictionary}

\begin{enumerate}
\item 
\begin{description}
\item[Name:] task-list (see database module for description)
\end{description}
\end{enumerate}

@


1.3
log
@*** empty log message ***
@
text
@d30 1
a30 1
indepenedent of one another, so a structure chart would be of very
d61 1
a61 1
the user interface that the user has contorl over.
@


1.2
log
@*** empty log message ***
@
text
@d17 7
d29 4
d50 3
a52 1
invoked based upon user input.
d59 161
d229 8
d251 1
a251 6
\item[Name:] file-d
\item[Where/How Used:] file-d is the file descriptor for the LaTeX file we
are writing to.  It is used in {\bf generate-pert-chart} to open and
close the file, and in {\bf generate-pert-box} to write the formatting
information out to the file.
\item[Description:] file-d = *file descriptor*
a252 70

\item
\begin{description}
\item[Name:] page-down-index
\item[Where/How Used:] This is an index used in {\bf
generate-pert-chart} to count how many pages down we have generated
thus far.
\item[Description:] page-down-index = *integer range 0..MAXINT*
\end{description}

\item
\begin{description}
\item[Name:] page-across-index
\item[Where/How Used:] This is an index used in {\bf
generate-pert-chart} to count how many pages across we have generated
thus far.
\item[Description:] page-across-index = *integer range 0..MAXINT*
\end{description}

\item
\begin{description}
\item[Name:] pages-across
\item[Where/How Used:] This is an index used in {\bf
generate-pert-chart} and in {\bf split-pert-chart-into-pages} to store
the number of pages across we will have.  It is calculated in {\bf
split-pert-chart-into-pages} and passed back up to {\bf generate-pert-chart}.
\item[Description:] pages-across = *integer range 0..MAXINT*
\end{description}

\item
\begin{description}
\item[Name:] pages-down
\item[Where/How Used:] This is an index used in {\bf
generate-pert-chart} and in {\bf split-pert-chart-into-pages} to store
the number of pages down we will have.  It is calculated in {\bf
split-pert-chart-into-pages} and passed back up to {\bf generate-pert-chart}.
\item[Description:] pages-down = *integer range 0..MAXINT*
\end{description}

\item
\begin{description}
\item[Name:] matrix-of-task-lists
\item[Where/How Used:] This is a matrix of task lists, with each cell
in the matrix being a list of tasks that appear on that page (i.e.\
cell 1-1 is the first page of the document, cell 1-2 is the page
before it, etc.).
\item[Description:] matrix-of-task-lists = $\left\{\mbox{task-list-vec}\right\}^{n}$\\
task-list-vec = $\left\{\mbox{task-list}\right\}^{m}$
\end{description}

\item
\begin{description}
\item[Name:] maximum-x
\item[Where/How Used:] This is the maximum x coordinate found in the
PERT formatting information.  Using this we can calculate how many
pages across we will have.  It is used in {\bf
split-pert-chart-into-pages}.
\item[Description:] maximum-x = *integer range 0..MAXINT*
\end{description}

\item
\begin{description}
\item[Name:] maximum-y
\item[Where/How Used:] This is the maximum y coordinate found in the
PERT formatting information.  Using this we can calculate how many
pages across we will have.  It is used in {\bf
split-pert-chart-into-pages}.
\item[Description:] maximum-y = *integer range 0..MAXINT*
\end{description}

@


1.1
log
@Initial revision
@
text
@d27 14
d66 81
@
