;
; Date and Calendar Demonstration Program Help Text
;
; Note:  This help file must be compiled with the TVHC.EXE Version 1.1
;        help file compiler.
;

.topic Document=1000
 Date and Calendar Demonstrator 
  
Welcome to Date and Calendar Demonstrator. Date and Calendar Demonstrator was
written by David L. Kutzler, Major, USAF, 2804 Sioux, Glendale, AZ 85307.
Date and Calendar Demonstrator was written in Turbo Pascal Version 7.0 (tm)
using the Object Oriented Programming (OOP) facilities of Borland's Turbo
Vision (tm) environment.

Date and Calendar Demonstrator is a simple demonstration that demonstrates
the date and calendar routines in the DATES.PAS and CALENDAR.PAS units. To
fully understand these units, first read the {Date and Calendar Theory:Theory}
help topic and then refer to the {DATES.PAS:Dates} and {CALENDAR.PAS:Calendar}
help topics.

.topic Theory
 Date and Calendar Theory 
  
Understanding the date and calendar routines found in the {DATES.PAS Unit:Dates}
and {CALENDAR.PAS Unit:Calendar} requires a basic understanding of date and
calendar theory. Early calendars were based on easily observed astronomical
cycles:  the earth day, the solar year, the lunar cycle. The problem is that
these cycles are not congruent. That is, the solar year is not an EXACT
INTEGER number of days long. A 365 day year is too short. Like a slow watch,
a 365 day year will slowly move out of phase with the solar year. Every four
years, the Vernal Equinox, the first day of Spring, will appear to fall one
day later in the year. Similarly, a 366 day year will cause the Vernal
Equinox to appear as if it is occurring THREE days earlier in the year every
four years. A lunar calendar, of twelve lunar cycles, will cover about 355
days, i.e., 10.25 days shorter than the solar year. Any integer number of
days that you select will have to be corrected from time to time by adding
or subtracting days to the calendar to bring it back into alignment with the
solar year so that the Vernal Equinox falls on same date each year. Adjusting
the calendar from time to time by adding or subtracting days to realign it
with the solar year is called INTERCALATION.

Our modern calendar is based on the Roman calendar, a lunar calendar. The
Roman calendar quickly went out of phase with the solar year. The Roman
calendar was periodicly intercalated by adding an intercalary month.
Unfortunately, intercalation was left up to the whim of Roman politicians.
Julius Caesar reformed the lunar based Roman calendar because it was
completely out of phase with the seasons. He ignored lunar cycles and made
the twelve months either thirty or thirty-one days long. On the advice of
Egyptian astronomers, he set the year to 365.25 days. The new calendar was
intercalated by accumulating the quarter day for four years and adding it to
the end of February on years evenly divisible by four, i.e. on "leap" years.

Julius Caesar named the seventh month "Julius" after himself. We know this
month as July. His successor, Augustus Caesar, renamed the eighth month
"Augustus" after himself and borrowed a day from February to make it thirty
one days long so that he would be honored no less than Julius Caesar. We
know this month as August. The so called "Julian" calendar was used
throughout Europe until well into the Renaissance. The Julian calendar's
system of intercalation contains an error. The length of a solar year is
closer to 365.24 days than 365.25. The difference is less than 0.01 day per
year, but the Julian calendar gains three days every four centuries. By 1582,
the Vernal Equinox was falling on March tenth rather than March twenty first.

Pope Gregory XIII reformed the calendar in 1582 because religous holy days
were not being celebrated on the correct days. To realign the calendar to
the solar year, he dropped ten days from October, 1582. The day after
October 4, 1582 was October 15, 1582. To keep the calendar in alignment
with the solar year, he reformed the rules for intercalation. Leap years
were still evenly divisible by four, but century years are treated
differently. Years that are evenly divisible by 100, i.e., century years,
are only leap years if they are also evenly divisible by 400. Thus, 1900
was NOT a leap year, but 2000 will be a leap year.

The Catholic countries of Europe adopted the Gregorian calendar reform
immediately. England and all of its colonies did not adopt the reform.
Queen Elizabeth I of England was in the middle of a long-running spat with
the Pope that started when her father, Henry VIII split from the Church
over its refusal to allow him to divorce his wife to marry his mistress.
England and its colonies (including the future American colonies) did not
accept the Gregorian calendar reform for another 170 years. By then the
Julian calendar was eleven days out of phase with the solar year. The eleven
days were dropped from the month of September, 1752. The day after September
2, 1752 was September 14, 1752.

Historical dates before the adoption of the reform are recorded as Julian
calendar dates while historical dates after the reform are recorded as
Gregorian calendar dates. The 170 year delay before England adopted the
reform creates some odd problems for historians and geneologists. The
Pilgrim's landing at Plymouth Rock occurred on December 21, 1620 in England,
but occurred on New Year's Eve, December 31, 1620 in the rest of Europe.

Performing mathematics on dates is awkward, because dates are based on such
a bizzare numbering system. The problem is similar to the difficulty
encountered when trying to perform mathematics on Roman numbers. To better
appreciate this, try to multiply MCMLI by MCMXXXIV. It is actually easier
to convert the Roman numbers to decimal integers, do the math and convert
the result back to Roman numbers.

Joseph Scaliger, a sixteenth century mathematician and astronomer invented
a system for dates that allows us to convert dates into simple integers that
are much easier to manipulate mathematically. Scaliger named his system
"Julian" dates after his father (not after Julius Caesar as is often
presumed). A Julian date is the integer number of days that have elapsed
since January 1, 4713 B.C. Scaliger picked this date because several
important astonomical cycles converge on that date. For example, 2415021
days elapsed from January 1, 4713 B.C. and January 1, 1900 A.D. Therefore,
2415021 is the Julian date for January 1, 1900 A.D.

Julian dates are ideal for computers because they can be added, subtracted,
multiplied and divided, just like any other integer. To find how many days
there are between two dates, convert them both to Julian dates and subtract.
To find what date is an exact number of days in the future, convert the
date to a Julian date, add the desired number of days and convert the result
back to a date. To find on what day of the week a date falls, convert the
date to a Julian date and divide it by seven. A remainder of zero means that
it's a Monday, one is Tuesday, two is Wednesday, etc. Although Julian dates
are great for computers, they are very awkward for people. The Julian date
2369916 is meaningless until it is converted to the more familiar date
July 4, 1776.

.topic Dates
 The DATES.PAS Unit 
  
Read the {Date and Calendar Theory:Theory} help topic before continuing. The
DATES.PAS unit defines a set of types, variables, constants and routines
for manipulating dates.

The DATES.PAS Unit first defines scalar types for the days of the week and
months:

 Days   = (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
 Months = (error, Jan, Feb, Mar, Apr, May, Jun,
                  Jul, Aug, Sep, Oct, Nov, Dec);

The "Date" type is the most important type in the DATES.PAS unit. All dates
must be declared as being of this type:

 PDate = ^Date;
 Date  = Record
          day,
          year:   integer;
          month:  Months
         end;

Read the {Date and Calendar Theory:Theory} help topic to understand Julian
dates. The DATES.PAS Unit defines a type for Julian dates. I called the
type Scaliger in honor of the inventor of Julian dates:

 PScaliger = ^Scaliger;
 Scaliger  = LongInt;

Date_Strings is a type for representing dates as strings:

 PDate_Strings = ^Date_Strings;
 Date_Strings  = string[30];

Null_Date is a structured, typed constant that is used as a neutral value for
initializing dates. This is the same as using zero to initialize integers.

 Null_Date:  Date = (day:    0;
                     year:   0;
                     month:  error);

Day_string is a structured, typed constant array of strings that can be used
to supply string equivalents for the days of the week. The array is indexed
on the user defined scalar type "Days."

 day_string:  Array[Days] of string[10] = ('Monday',    'Tuesday',
                                           'Wednesday', 'Thursday',
                                           'Friday',    'Saturday',
                                           'Sunday');

A typical use would be to use the Day_Of_Week function (described below) to
print the day of the week on which a date falls:

 WriteLn(day_string[Day_Of_Week(Todays_Date)]);

Month_string is a structured, typed constant array of strings that can be
used to supply string equivalents for the months. The array is indexed on
the user defined scalar type "Months."

 month_string:  Array[Months] of string[10] = ('ERROR',
                                               'January',   'February',
                                               'March',     'April',
                                               'May',       'June',
                                               'July',      'August',
                                               'September', 'October',
                                               'November',  'December');

DATES.PAS defines the following procedures and functions:

 Function  Leap(year:  integer):  Boolean;

LEAP returns TRUE if the year passed to it is a leap year. This function
applies Julian calendar rules for intercalation on dates before the
Gregorian calendar reform and Gregorian rules for intercalation for dates
after the reform. LEAP assumes the English adoption of the reform in 1752
rather than the European adoption of the reform in 1582.

 Function  Days_per_Month(month:  Months;
                           year:  integer):  integer;

DAYS_PER_MONTH returns the number of days in the month passed to it. The
year must also be passed to accomodate the variable number of days in
February on leap years.

 Function  Valid_Date(the_date:  Date):  Boolean;

VALID_DATE returns TRUE if the date passed to it is a valid date. Valid_Date
will return FALSE if it is passed the date April 31, 1994 because there are
only thirty days in April.

 Function  Julian(the_date:  Date):  Scaliger;

JULIAN returns the Julian date for the standard date passed to it. Julian
returns the Julian date 2369916 when it is passed the date July 4, 1776.

 Procedure Standard( Julian_date:  Scaliger;
                    Var the_date:  Date);

STANDARD accepts a Julian date via the argument Julian_date and returns the
equivalent Standard date via the "called-by-name" argument the_date.

 Function  Day_of_Week(the_date:  Date):  Days;

DAY_OF_WEEK accepts a date via the argument the_date and returns the day of
the week on which the_date falls.

 Procedure Get_Date(Var the_date:  Date);

GET_DATE reads the computer's system date and assigns it to the_date, a
called-by-name argument.

 Procedure Set_Date(the_date:  Date);

SET_DATE sets the computer's system date to the_date.

 Function  String_Date(   the_date:  Date;
                          military,
                       abbreviated,
                             short:  Boolean):  date_strings;

STRING_DATE returns the_date as a formatted string. If the Boolean argument
"military" is TRUE, the date will be in the military format, i.e., in the
order day, month, year. Otherwise, the returned date will be in the usual
order of month, day, year. If the argument "abbreviated" is TRUE, then the
month name will be abbreviated to three letters. Otherwise, the month name
will be spelled in full. If the argument "short" is TRUE, then the year will
be shortened to the last two digits. Otherwise the year will include all
digits. The table below shows the date string that would be returned by
all possible combinations of the Boolean arguments applied to the date
January 4, 1951:

 ͻ
  Military  Abbreviated  Short  Result           
 ͹
  TRUE      TRUE         TRUE   04 Jan 51        
  TRUE      TRUE         FALSE  04 Jan 1951      
  TRUE      FALSE        TRUE   04 January 51    
  TRUE      FALSE        FALSE  04 January 1951  
  FALSE     TRUE         TRUE   Jan 04, 51       
  FALSE     TRUE         FALSE  Jan 04, 1951     
  FALSE     FALSE        TRUE   January 04, 51   
  FALSE     FALSE        FALSE  January 04, 1951 
 ͼ

.topic Calendar
 The CALENDAR.PAS Unit 
  
Read the {Date and Calendar Theory:Theory} help topic before continuing. It
may be useful to read the {DATES.PAS Unit:Dates} help topic before
continuing. The CALENDAR.PAS unit defines the Turbo Vision objects for date
and calendar views:

 PGenericDateView  = ^TGenericDateView;
 TGenericDateView  = Object(TView)
                      The_Date:     Date;
                      Date_String:  DateInputString;
                      Date_Buffer:  TDrawBuffer;
                      Attribute:    MagicColor;
                      Right:        Boolean;
                      Constructor Init(Bounds: TRect);
                      Function    DataSize:  Word;                   Virtual;
                      Procedure   SetData(Var  Rec);                 Virtual;
                      Procedure   SetState(AState:  Word;
                                           Enable:  Boolean);        Virtual;
                      Procedure   GetData(Var  Rec);                 Virtual;
                      Function    GetPalette:  PPalette;             Virtual;
                      Procedure   Draw;                              Virtual;
                      Procedure   Update(ADate:  Date);              Virtual;
                     end;

This Turbo Vision view simply displays a date. The view should be initialized
with a minimum bounds of eighteen characters wide by one line high. The
TGenericDateView will display "Unknown" unless you use the "Update"
procedure to pass a date to the view. You may update the view to display any
date by using the Update procedure. TGenericDateView is the ancestor view for
all date views. The date in a TGenericDateView is right-justified and its
color scheme is the same as that for TStaticText. A TGenericDateView is not
selectable.

TDateView is a descendent of the TGenericDateView. The date displayed by
TDateView is Left Justified and its color scheme is the same as that for the
TInputLine.  A TDateView is not selectable.

 PDateView         = ^TDateView;
 TDateView         = Object(TGenericDateView)
                      Constructor Init(ARect:  TRect);
                      Function    GetPalette:  PPalette;  Virtual;
                     end;

TMonthYearView is a specialized TDateView. It doesn't display the entire
date, just the month and year. TMonthYearView is useful where you only need
the month and year, such as a maintenace schedule where you just need to
know which month that the next scheduled maintenance is due. Pressing a digit
key causes TMonthYearView to update the display. For example, if it is
currently displaying "June 1995," pressing "6" on the keyboard will cause it
to update the display to "December 1995," i.e., six months from the currently
displayed month and year. The Up Arrow and Down Arrow keys will update the
display to the previous month or following month respectively. Clicking the
view with the right or left mouse button will update the display to the
previous month or following month respectively. For a more detailed
description of how to operate TMonthYearView, read the {Month and Year View:MonthYearView}
help topic.

 PMonthYearView    = ^TMonthYearView;
 TMonthYearView    = Object(TDateView)
                      Constructor Init(ARect:  TRect);
                      Procedure   Toggle;
                      Procedure   UnToggle;
                      Procedure   Draw;                              Virtual;
                      Procedure   HandleEvent(Var  Event:  TEvent);  Virtual;
                     end;

The Toggle and UnToggle methods update the the display to the following and
previous month respectively.

Two objects named TScrollCalendar and TCalendarIcons are defined. These are
abstract objects are pieces of TCalendar:

 PCalendar         = ^TCalendar;
 TCalendar         = Object(TDialog)
                      Calendar:   PScrollCalendar;
                      Icons:      PCalendarIcons;
                      Constructor Init(ARect:       TRect;
                                       ADate:       Date;
                                       AView_Only:  Boolean);
                      Procedure   HandleEvent(Var  Event:  TEvent);  Virtual;
                      Destructor  Done;                              Virtual;
                     end;

TCalendar is a specialized dialog box. If you pass a valid date to TCalendar
in its Init method, TCalendar will display the calendar for the month in
which the date lies. TCalendar has two personalities:  A simple scrolling
desk calendar that will display any month in any year and a scrolling desk
calendar that can be used to select a date by pointing and clicking and
return the selected date to the calling routine. You select the personality
by setting the Boolean argument "AView_Only" in TCalendar's Init method.
Setting AView_Only to TRUE causes TCalendar to produce a simple desk
calendar. Setting AView_Only to TRUE causes TCalendar to produce a calendar
that allows you to select and return a date. The argument ARect must be
assigned a TRect of the following dimensions:  Assign(0,0,26,10).

You direct TCalendar to display different calendars by key presses or by
mouse clicking TCalendar's scroll bars and icons. For a more detailed
description of how to operate TCalendar as a simple desk calendar, read the
{Desk Calendar:DeskCalendar} help topic. For a more detailed description of
how to operate TCalendar as a date selection calendar, read the
{Date Selection Calendar:DateSelectCalendar} help topic.

A relatively painless way to invoke a scrolling desk calendar is to use the
stand-alone procedure View_Calendar, declared as follows:

 Procedure View_Calendar(ARect:  TRect;  ADate:  Date);

A similar stand-alone procedure exists for the date selection calendar:

 Procedure Pick_Date(ARect:  TRect;  Var ADate:  Date);

The selected date is returned via the called-by-name variable "ADate."

The most useful view in the CALENDAR.PAS Unit is the TDateInputView:

 PDateInputView    = ^TDateInputView;
 TDateInputView    = Object(TGroup)
                      The_Date:  Date;
                      DateView:  PDateView;
                      Icon:      PDateViewIcon;
                      Constructor Init(ARect:  TRect);
                      Function    DataSize:  Word;                   Virtual;
                      Procedure   SetData(Var  Rec);                 Virtual;
                      Procedure   SetState(AState:  Word;
                                           Enable:  Boolean);        Virtual;
                      Procedure   GetData(Var  Rec);                 Virtual;
                      Procedure   Draw;                              Virtual;
                      Procedure   HandleEvent(Var  Event:  TEvent);  Virtual;
                     end;

TDateInputView displays a date and a down-arrow icon something like this:

   September 18, 1994

Clicking the icon invokes the {Date Selection Calendar:DateSelectCalendar}.
After selecting a date, the date selection calendar closes and the date
displayed in the TDateInputView updates itself to the selected date. The
TDateInputView reduces inputing dates to a simple point-and-click operation.

TJulianDays compares two dates and displays the number of days between
these dates. This, by itself, can be quite useful. TJulian days is also a
useful ancestor view for any view that must display a value derived from
two dates. The two dates are called the Reference date and the Target date.
A typical example might be where you have a perishable product that must
be used before a certain number of days. Set the Reference date as the date
of manufacture and set the Target date as today's date. TJulianDays will
automatically compare these dates and display the number of days that the
product has been in inventory. TJulianDays is declared as follows:

 PJulianDays    = ^TJulianDays;
 TJulianDays    = Object(TStaticText)
                   Target_Date,
                   Reference_Date:  PDate;
                   Constructor Init(Var ABox:  TRect);
                   Procedure   Point_To_Target(ATarget:  PDate);
                   Procedure   Point_To_Reference(AReference:  PDate);
                   Procedure   Update;
                   Procedure   Draw;                              Virtual;
                   Procedure   HandleEvent(Var  Event:  TEvent);  Virtual;
                  end;

Note that Reference_Date and Target_Date are not dates per se. They are
simply pointers to dates. Use the Point_To_Reference and Point_To_Target
procedures to point to the dates. If the Reference and Target date are the
dates in TDateInputViews, the value displayed in TJulianDays will be
automatically updated to reflect a new value any time that the date in either
TDateInputView is changed. This is because the TDateInputView broadcasts
a message any time that it is changed and the TJulianDays HandleEvent
method interprets such a broadcast as an instruction to examine the Reference
and Target dates, recalculate and display the new value. For an example of
the TJulianDays view, it is used in the {Date Difference Calculator Dialog Box:AgeCalc}.

Several other views descend from TJulianDays:

 PAgeDisplay       = ^TAgeDisplay;
 TAgeDisplay       = Object(TJulianDays)
                      Procedure   Draw;  Virtual;
                     end;

If you point Reference_Date to a TDateInputView that is set to a person's
date of birth and point Target_Date to today's date, then TAgeDisplay will
automatically display the person's current age. If you point Target_Date to
a date other than today's date, it will display the person's age on the
current value of the Target_Date. For an example of the TAgeDisplay view,
it is used in the {Age Calculator Dialog Box:AgeCalc}.

TEDCDisplay is a variation of TJulianDays that calculates and displays a
pregnant woman's EDC (Estimated Date of Confinement or "due date"). The
average length of a human pregnancy is 280 days or forty weeks from the
first day of her last menstrual period until delivery. The EDC is calculated
by simply adding 280 days to the first day of the last menstrual period.

 PEDCDisplay       = ^TEDCDisplay;
 TEDCDisplay       = Object(TJulianDays)
                      Constructor Init(Var ABox:  TRect);
                      Procedure   Draw;  Virtual;
                     end;

The TEDCDisplay only needs a Reference date. The Target date is not used.
Point the reference date to a date that contains the first day of the last
menstrual period. Changing the Reference date causes TEDCDisplay to update
the displayed EDC. For an example of the TEDCDisplay view, it is used in the
{EDC Calculator Dialog Box:EDCCalc}.

TGestDisplay is a variation of TJulianDays that displays the gestation of a
pregnancy. The gestation of a pregnancy is the number of weeks and days that
have elapsed from the first day of the last menstrual period. The gestation
can be calculated forwards, i.e., from the last menstrual period or backwards
from the EDC or "due date." TGestDisplay assumes that you are calculating
from the last menstrual period. If you set the "Use_EDC" Boolean variable
to TRUE from its default of FALSE, TGestDisplay will calculate the gestation
backwards from the EDC. If Use_EDC is FALSE then Reference_Date should point
to a date that represents the patient's last menstrual period.  If Use_EDC
is TRUE then Reference_Date should point to a date that represents the
patient's EDC. The Target_Date in either case should point to the date for
which you which to know the gestation. This would typically be today's date,
which would give you the current gestation. If you want PGestDisplay to
display the gestation on a given date other than today's date, then point
the Target_Date to that date. For an example of the TGestDisplay view, it is
used in the {Gestation Calculator Dialog Box:GestationCalc}.


 PGestDisplay      = ^TGestDisplay;
 TGestDisplay      = Object(TJulianDays)
                      Use_EDC:         Boolean;
                      Constructor Init(Var ABox:  TRect);
                      Procedure   Set_Use_EDC(ABoolean:  Boolean);
                      Procedure   Draw;  Virtual;
                     end;

.topic Help
 The Help System 
  
Welcome to the Help System. The rectangular box that you are reading is
called the "Help Window." The best way to start understanding how to operate
a this program is to understand how to use the Help System.

Look for a group of keys on the top or left side of the keyboard that are
marked "F1," "F2," "F3," etc. Press the key marked "F5." You've just
discovered the "Zoom" key. If you press it again it will "Unzoom" the Help
Window.

Find a key marked with an Up Arrow and another marked with a Down Arrow.
They're usually located on the right side of the keyboard. Press the Down
Arrow key a couple times and the Up Arrow key a couple times to see how
these keys scroll the text in the Help Window up and down one line at a
time so that you can see more text.

Find two keys marked "Page Up" and "Page Down." Pressing these keys will
scroll the text in the Help Window a page at a time rather than one line at
a time. These keys may be marked "PG UP" or PG DN" on some keyboards.

If you have a "mouse" or similar pointing-device and it has a compatible
mouse driver, you may operate the Help Window with the mouse. Look in the
upper right corner of the Help Window. There is a single or double headed
arrow icon. This is the Zoom Icon. "Point" to the Zoom Icon with your mouse
and "click" it to Zoom or Unzoom the Help Window.

On the right side of the Help Window is the "Vertical Scroll Bar." The
Vertical Scroll Bar is actually a collection of different icons that mimic
the actions of keyboard counterparts when mouse clicked as shown below:

  <-- Up Arrow Icon   = Up Arrow Key.
  <-- Page Up Icon    = Page Up Key.
  <-- File Position Marker.
  <-- Page Down Icon  = Page Down Key.
  <-- Down Arrow Icon = Down Arrow Key.

Now that you know how to navigate the Help Window, let's continue our lesson
on the Help System. The text that is in the Help Window is stored in a file
called the Help File. The Help File is divided into "help topics." Each help
topic is a thumbnail discussion of an aspect of a the program. The help
topic that you are now viewing is called "How to Use the Help System."
There are many available help topics.

You may invoke the Help Window at any point as the program runs by
pressing the function key marked "F1." The F1 function key is called the Help
key. Which of the many help topics that the Help Window brings
into view depends on what you are doing when you press the Help key. If you
are using the Menu System and desire more information about a menu choice,
simply shift the focus to that menu choice and press the Help key. The Help
Window will appear with a help topic that explains that menu choice. If an
error or warning message appears, press the Help key for an explanation. At
any point in the program, Help is only as far away as the Help key. The
only time that the Help key will not work is when you are already in the Help
System (such as now).

Certain words or phrases in the Help Window are "highlighted," i.e., they
are a different color than the rest of the text. The highlighted words and
phrases are "related help topics." That means that there is another help
topic available that discusses the highlighted topic in more detail. There
are two related help topics in this paragraph. Both are a different color
than the rest of the text (indicating that they are related help topics) and
both are a different color from each other. The two highlighted phrases are
not the same color because one has the {Help Window Focus:HelpFocus} and the
other does not. Press the "Tab" key one time and see what happens. The Tab
key shifted the help window focus to the next {Related Help Topic:RelatedTopic}.
Now, press the Shift key, hold it down and press the Tab key again. This time
the Help Window focus shifted BACK to the previous related help topic.

The purpose of the Help Window focus is to allow you to view the related help
topic in the Help Window. To view a related help topic, shift the Help Window
focus to the desired related help topic and press the Enter key. This invokes
the Help Window to display the related help topic. Mouse users may shift the
Help Window focus directly to a related help topic by pointing to it and
clicking it. Mouse users may invoke the Help Window to display a related help
topic by "double-clicking" it.

A special help "topic" is the Table of Contents. The Table of Contents lists
every help topic alphabetically. Each listed help topic is highlighted,
therefore, you may invoke any help topic by finding it in the Table of
Contents, shifting the Help Window focus to it and invoking it. To invoke the
Table of Contents, rather than the context specific Help Window, press the
Shift key, hold it down and press the "F1" function key. When you press the
Shift key and the F1 (Help) key, it is called the "Shift+Help" key.

You may "close" the Help Window by pressing the key marked "Esc" or "Escape."
Mouse users may Close the Help Window by clicking the Close Window Icon. The
Close Window Icon is located in the upper left corner of the Help Window.

This is the end of this help topic, but if you want to learn more basic
information about the program and its operation, shift the Help Window focus
to the {Menu System:MenuSystem} or {Date and Calendar Documenation:Document}
related help topics and press the Enter key.

.topic RelatedTopic
 Related Help Topics 
  
The text that is in the {Help System:Help} Help Window is stored in a file
called the Help File. The Help File is divided into "help topics." Each help
topic is a thumbnail discussion of some aspect of a Turbo Vision program. The
Help Window displays one topic at a time. Certain words and phrases in the
Help Window may be highlighted, i.e., a different color than the rest of the
text. The highlighted words and phrases are "related help topics." That means
that there is another help topic available that discusses the highlighted
topic in more detail. You may cause the Help Window to display the text for
one of the related help topics by shifting the {Help Window Focus:HelpFocus}
to the highlighted topic and pressing the Enter Key.

.topic HelpFocus
 The Help Window Focus 
  
The text that is in the {Help System:Help} Help Window is stored in a file
called the Help File. The Help File is divided into "help topics." Each help
topic is a thumbnail discussion of some aspect of this program.
The Help Window displays one topic at a time. Certain words and phrases in
the Help Window may be highlighted, i.e., a different color than the rest of
the text. The highlighted words and phrases are "related help topics." That
means that there is another help topic available that discusses the
highlighted topic in more detail.

One of the related help topics will be a different color from all the other
related help topics. This is the "Focused" related help topic. If you press
the Tab key, the focus will jump to the next related help topic in the
current Help Window. If you press the Shift key, hold it down and then press
the Tab key (Shift+Tab), the focus will jump to the previous related help
topic. Mouse users may shift the Help Window focus to any related help topic
by pointing to it with the mouse cursor and "clicking" it.

If you press the Enter key, the Help Window will display the Help Window text
for the focused related help topic. Mouse users may "double-click" any
related help topic to invoke the Help Window for the related help topic.
Therefore, you may explore the Help System for a specific topic and any
related help topics by shifting the Help Window focus to any related help
topics in the current Help Window and invoking them with the Enter key or a
mouse double-click.

.topic MenuSystem
 The Menu System 
  
A computer program, is a set of instructions that tell a computer how to
perform a task or group of tasks. A typical computer program can perform
many different tasks. As you operate the program, you must be able to direct
the program to perform a specific task. The Menu System allows you to select
and "invoke" (i.e., perform) a given task.

There are two levels to the Menu System. The {Menu Bar:MenuBar} is the first
level. The Menu Bar organizes the program's many tasks into logical
groups. Each group of tasks becomes a {Drop-Down Menu:DropDownMenu}. The
Drop-Down Menus are the second level of the Menu System. To invoke a specific
program task via the Menu System, use the Menu Bar to invoke the Drop-Down
Menu where the task is located and then use the Drop-Down Menu to invoke the
task.

.topic MenuBar
 The Menu Bar 
  
The Menu Bar is part of the {Menu System:MenuSystem}. The Menu Bar is located
along the top of the program's screen. It looks like this:

 {Date Calculator:DateCalcMenu}  {Calendar:CalendarMenu}  {Help:HelpMenu}

The Menu Bar is the first level of the Menu System. Each word in the Menu Bar
is a Menu Bar "choice." The Menu Bar organizes the program's many tasks
into logical groups. Each group of tasks becomes a {Drop-Down Menu:DropDownMenu},
i.e., the second level of the Menu System. To invoke a given program task via
the Menu System, use the Menu Bar to invoke the Drop-Down Menu where the task
is located and then use the Drop-Down Menu to invoke the task.

The Menu Bar will ignore you unless you get its attention. You get the Menu
Bar's attention by shifting the program's {Focus} to the Menu Bar. One
way to shift the program's focus to the menu bar is to press the "F10"
{Function Key:FunctionKey}. The F10 function key is called the "Menu" key.

The bottom line of the program's screen is called the {Status Line:StatusLine}.
The Status Line does various things, but one of its functions is to remind
you of the most commonly used keys. The F10 Menu key is listed in the Status
Line. The Status Line will change its appearance as you operate the program.
There will be times when the Menu Bar will not operate, for example, when a
{Dialog Box:Dialog} is on the screen. The Menu key disappears from the Status
Line when the Menu Bar is inoperable.

When you press the Menu key, the program passes the program focus to
the Menu Bar. The Menu Bar, in turn, passes the focus to to one of its Menu
Bar choices. The Menu Bar choice shows that it has the focus by highlighting
itself, i.e., turning a different color than the other Menu Bar choices.

The Menu Bar usually passes the focus to the first Menu Bar choice. In the
case of this program, that would be "Date Calculators." If you press the
Right Arrow key or the Left Arrow key, the focus will shift to another Menu
Bar choice.

The purpose of shifting the focus to a particular Menu Bar choice is to
invoke that choice. Invoking a Menu Bar choice causes the Menu Bar to invoke
the Drop-Down Menu associated with that Menu Bar choice. You may invoke the
focused Menu Bar choice by pressing the Enter key or the Down Arrow key. For
example, if the focus is on the "Date Calculator" Menu Bar choice, pressing
the Enter key or the Down Arrow key will invoke the
{Date Calculator Menu:DateCalcMenu} Drop-Down Menu.

Another way to invoke a particular Drop-Down Menu is to press the key for the
{Highlighted Letter:Highlighted} of a Menu Bar choice. A Menu Bar choice
consists of a word. One letter in each Menu Bar choice is a different color
than the others. This different colored letter is the "highlighted" letter
for that Menu Bar choice. When the Menu Bar has the focus, pressing the key
that corresponds to the highlighted letter of a Menu Bar choice will shift
the focus to that Menu Bar choice and invoke its Drop-Down Menu.

Another way to invoke a Menu Bar choice is to use the {Alt Key Combination:KeyCombo}
for a Menu Bar choice. The Alt key combination will invoke the Drop-Down Menu
for a Menu Bar choice even if the menu bar does not have the focus. To use
the Alt key combination for a Menu Bar choice, press the Alt key, hold it
down and press the highlighted letter for the desired Menu Bar choice.

If you have a {Mouse} and your "mouse driver" is compatible with the
program, you may invoke the Drop-Down Menu for a Menu Bar choice by pointing
to a Menu Bar choice with the mouse cursor and clicking it. A mouse click
will shift the focus to the Menu Bar and invoke the Menu Bar choice all in
one step.

The Menu Bar works with the {Help System:Help}. If you want the Help System
to explain a Menu Bar choice, shift the focus to the desired Menu Bar choice
and press the Help key, i.e., the "F1" {Function Key:FunctionKey}.

If you wish to shift the program focus away from the Menu Bar, press the
"Esc" or "Escape" key. This will be necessary if you want to exit the program
as the "Alt+X" Exit command is only available when neither the Menu Bar nor
a Drop-Down Menu has the focus.

.topic DropDownMenu
 Drop-Down Menus 
  
Drop-Down Menus are part of the {Menu System:MenuSystem}. A Drop-Down Menu
will only be on the screen if it has been "invoked." A Drop-Down Menu is
invoked via the {Menu Bar:MenuBar}. Invoking the "Date Calculator" Menu Bar
choice will cause the Menu Bar to invoke the Date Calculator Menu that
looks like this:

 Ŀ
  Age Calculator...               
  Date Difference...              
  EDC Calculator...               
  Gestation Calculator...         
  Exit Program              Alt+X 
 

A Drop-Down Menu, such as the example above, consists of one or more lines.
Each line has a word or phrase that describes some task that Dysplasia
Tracker can perform. Each such task is called a Drop-Down Menu choice. For
example, "Age Calculator..." is the program task that allows you calculate
a person's current age from their birth date.

One Drop-Down Menu choice will be "highlighted," i.e., a different color than
the other choices. The differently colored choice is the {Focused:Focus}
choice. When the Menu Bar invokes a Drop-Down Menu, the Menu Bar passes the
focus to the Drop-Down Menu. The Drop-Down Menu then passes the focus to one
of its Drop-Down Menu choices.

A Drop-Down Menu usually passes the focus to the first Drop-Down Menu choice.
In the case of the Date Calculator Menu, that would be "Age Calculator..."
If you press the Down Arrow key or the Up Arrow key, the focus will shift to
another Drop-Down Menu choice.

The purpose of shifting the focus to a particular Drop-Down Menu choice is to
invoke that choice. Invoking a Drop-Down Menu choice causes the Drop-Down
Menu to invoke the task associated with that Menu Bar choice. You may invoke
the focused Drop-Down Menu choice by pressing the Enter key. For example, if
you need to calculate an age, you may invoke the Date Calculator Menu from
the Menu Bar, shift the focus to the "Age Calculator..." choice and invoke it
by pressing the Enter key.

Note that after the "Exit Program" choice there is the odd notation "Alt+X."
This notation means that the "Exit Program" Drop-Down Menu choice has a
{Hot Key:Hotkeys}. A hot key allows you to directly invoke a Drop-Down Menu
choice by pressing one key or key combination. The hot key allows you to
bypass the Menu System entirely. Not all Drop-Down Menu choices have a hot
key. Hot keys are reserved for the most frequently used Drop-Down Menu
choices.

{Mouse} users may invoke a Drop-Down Menu choice by clicking it. A mouse user
would typically invoke a Drop-Down Menu by clicking a Menu Bar choice and
then invoke a Drop-Down Menu choice by clicking it.

Note that some of the Drop-Down Menu choices are followed by ellipses, i.e.,
"...". Ellipses indicate that invoking this Drop-Down Menu choice will
invoke a {Dialog Box:Dialog}. The dialog box will allow you to further
refine the program task that you desire or to input some sort of data. The
absence of ellipses indicates that the task is "stand-alone," i.e., the
program requires no further operator input to perform the task.

.topic DateCalcMenu
 The Date Calculators Menu 
  
The Date Calculators Menu is a {Drop-Down Menu:DropDownMenu} that looks like
this:

 Ŀ
  {Age Calculator...:Age}               
  {Date Difference...:Difference}              
  {EDC Calculator...:EDC}               
  {Gestation Calculator...:Gestation}         
  {Exit Program:Quit}              Alt+X 
 

You may invoke the Date Calculators Menu by using the {Menu Bar:MenuBar}
commands. With the Date Calculator Menu on the screen, you may invoke any of
the Date Calculators Menu choices by using the Drop-Down Menu commands.

.topic Age
 Age Calculator... 
  
This {Date Calculators Menu:DateCalcMenu} choice is used to calculate a
person's current age from their date of birth. Invoking this menu choice
will invoke the {Age Calculator Dialog Box:AgeCalc}.

.topic AgeCalc
 Age Calculator Dialog Box 
  
The Age Calculator Dialog Box is used to calculate a person's current age
from the person's birthdate and today's date. It is intended to demonstrate
the operation of the {Date Input View:DateInputView} and some simple date
mathematics. The Current Age view automatically calculates and displays the
age which demonstrates how a non-selectable display view can be linked to a
Date Input View in such a way that a change in the date causes the display
view to update itself. The Age Calculator Dialog Box looks approximately
like this:

 [] Age Calculator ͻ
                                         
     Birthdate:  Unknown  
   Current Age:  Unknown                 
                                         
         Click the down arrow icon       
          to enter the birthdate.        
                                         
        Ok        Help      Cancel    
                 
 ͼ

Birthdate is a Date Input View. Click the Down Arrow Icon or press the down
arrow key to enter a birthdate. This will invoke the {Date Selection Calendar:DateSelectCalendar}.
Use the Date Selection Calendar to select the birthdate. After you select a
birthdate in the Date Selection Calendar, press the Enter key or click the
"=" icon to close the Date Selection Calendar. This will update the Birthdate
view to reflect the date that you selected and will cause the Current Age
view to update itself to reflect the current age based on the birthdate that
you selected.

.topic Difference
 Date Difference... 
  
This {Date Calculators Menu:DateCalcMenu} choice is used to calculate the
difference, i.e., the number of days, between two dates. Invoking this menu
choice will invoke the {Date Difference Calculator Dialog Box:DifferenceCalc}.

.topic DifferenceCalc
 Date Difference Calculator Dialog Box 
  
The Date Difference Calculator Dialog Box allows you to calculate the
difference, i.e., the number of days between two dates that you enter. It
is intended to demonstrate the operation of the {Date Input View:DateInputView}
and how a non-selectable display view can be linked to two different Date
Input Views in such a way that a change in either date causes the display
view to update itself. The Date DIfference Calculator Dialog Box looks
approximately like this:

 [] Date Difference Calculator ͻ
                                         
    First Date:  Unknown  
   Second Date:  Unknown  
    Difference:  Unknown                 
                                         
         Click a down arrow icon         
             to enter a date.            
                                         
        Ok        Help      Cancel    
                 
 ͼ

Shift the {focus} to either the First Date or Second Date. Press the Down
arrow key or mouse click the Down Arrow Icon in either Date Input View. This
will invoke the {Date Selection Calendar:DateSelectCalendar}. Use the Date
Selection Calendar to select the date. After you select a date in the Date
Selection Calendar, press the Enter key or click the "=" icon to close the
Date Selection Calendar. Both the First Date and the Second Date must be
set to some value other than "Unknown" before a value other than "Unknown"
will appear in the Difference display view. The Difference display view will
automatically calculate the number of days between the First Date and the
Second Date. If the First Date preceeds the Second Date, the Difference will
be a positive number. If the First Date follows the Second Date, the
Difference will be a negative number.

.topic EDC
 EDC Calculator... 
  
This {Date Calculators Menu:DateCalcMenu} choice is used to calculate a
woman's EDC, or "due date," from her first day of last menstrual period.
Invoking this menu choice will invoke the {EDC Calculator Dialog Box:EDCCalc}.

.topic EDCCalc
 EDC Calculator Dialog Box 
  
The EDC Calculator Dialog Box allows you to calculate the EDC, or "due date,"
of a pregnant woman from the first day of her last menstrual period.  It is
intended to demonstrate the operation of the {Date Input View:DateInputView}
and some simple date mathematics. The EDC view automatically calculates and
displays the EDC which demonstrates how a non-selectable display view can be
linked to a Date Input View in such a way that a change in the date causes
the display view to update itself. The EDC Calculator Dialog Box looks
approximately like this:

 [] EDC Calculator ͻ
                                         
   Last Period:  Unknown  
           EDC:  Unknown                 
                                         
         Click the down arrow icon       
         to enter the last period.       
                                         
        Ok        Help      Cancel    
                 
 ͼ

Last Period is a Date Input View. Click the Down Arrow Icon or press the
down arrow key to enter the date of the last menstrual period. This will
invoke the {Date Selection Calendar:DateSelectCalendar}. Use the Date
Selection Calendar to select the last menstrual period. After you select a
last menstrual period in the Date Selection Calendar, press the Enter key or
click the "=" icon to close the Date Selection Calendar. This will update the
Last Period view to reflect the date that you selected and will cause the
EDC view to calculate and display the "due date."

The average length of a human pregnancy, from the first day of her last
menstrual period until delivery is 280 days. To calculate the "due date" is
as easy as converting the date of the last menstrual period (LMP) to a
Julian date, adding 280 days and converting the resulting Julian date back
to a standard date. The "due date" is called the EDC or Estimated Date of
Confinement. The term "confinement" is a quaint bit of arcane Americana.
There was a time when most American women had their babies at home. It was
the custom for the new mother to be "confined" to bed for several days after
birth while neighbor women tended her other children and took care of her
household duties.

.topic Gestation
 Gestation Calculator... 
  
This {Date Calculators Menu:DateCalcMenu} choice is used to calculate the
current gestation of a pregnant woman from either the last menstrual period
or from her "due" date. Invoking this menu choice will invoke the
{Gestation Calculator Dialog Box:GestationCalc}.

.topic GestationCalc
 Gestation Calculator Dialog Box 
  
The Gestation Calculator Dialog Box allows you to calculate the gestation of
a pregnancy, i.e., "how far along" is the pregnancy on a given date. It is
intended to demonstrate the operation of the {Date Input View:DateInputView}
and some slightly more complex date mathematics. The LMP Gestation view and
EDC Gestation view automatically calculate and display the gestation, or
"how far along" is the pregnancy, as calculated from the LMP Date Input View
or EDC Date Input View respectively. These views demonstrate how a
non-selectable display view can be linked to a Date Input View in such a way
that a change in the date causes the display view to update itself. The
Target Date is linked to both the LMP Gestation view and the EDC Gestation
view. The Target Date is used as the date for which the gestation is
calculated. This Date Input View is also used to demonstrate how a date may
be passed to a Date Input View. The SetDate routine is used to pass the value
of Todays_Date to the Target Date. The Gestation Calculator Dialog Box would
look about like this on December 5, 1994:

 [] Gestation Calculator ͻ
                                           
             LMP:  Unknown  
             EDC:  Unknown  
     Target Date:  December 5, 1994  
   LMP Gestation:  Unknown                 
   EDC Gestation:  Unknown                 
      Difference:  Unknown                 
                                           
          Click a down arrow icon          
              to enter a date.             
                                           
         Ok        Help      Cancel     
                   
 ͼ

The date displayed in Target Date will depend on the current value of the
system date of your system. Shift the {focus} to any of the Date Input Views
and press the Down Arrow key or click the Down Arrow Icon in one of the Date
Input Views. This will invoke the {Date Selection Calendar:DateSelectCalendar}.
Use the Date Selection Calendar to select the focused date. After you select
a date in the Date Selection Calendar, press the Enter key or click the "="
icon to close the Date Selection Calendar. This will update the focused date
view to reflect the date that you selected.

The average length of a pregnancy from the first day of the last menstrual
period until delivery is 280 days or forty weeks. The LMP Gestation view
calculates and displays the number of weeks and days that have elapsed
between the LMP and the Target Date. An accurate first day of last menstrual
period is the most reliable method for estimating gestation. If the woman
cannot accurately recall her LMP or has irregular periods, the LMP may have
to be disregarded in favor of a "due date" or EDC based on an ultrasound
examination.

The EDC Gestation calculates the gestation on the Target Date "backwards"
from the EDC. An ultrasound EDC is derived by applying regression analysis
to measurements of the fetal crown-rump length, head, abdomen and femur. The
accuracy of the ultrasound EDC varies with the gestation when the ultrasound
was performed. The Standard Error of the Mean (SEM) for an ultrasound done at
ten weeks is  0.5 weeks. The SEM for an ultrasound done at eighteen weeks is
 1.1 weeks. By thirty six weeks, the SEM is greater than  3.0 weeks. You
would be more inclined to accept an ultrasound EDC over an EDC based on a
last menstrual period if the discrepancy between the dates is greater than
the SEM. This brings us to the purpose of the Difference view. This view
calculates and displays the difference in weeks and days between the LMP
based EDC and the ultrasound derived EDC.

Assume, for example, that a woman's LMP is October 11, 1994. On December 30,
1994 she has an ultrasound which gives an EDC of July 31, 1995. Entering
these dates in the Gestation Calculator Dialog Box will make the dialog box
appear as follows:

 [] Gestation Calculator ͻ
                                           
             LMP:  October 11, 1994  
             EDC:  July 31, 1995  
     Target Date:  December 31, 1994  
   LMP Gestation:  11 Weeks 3 Days         
   EDC Gestation:  09 Weeks 4 Days         
      Difference:  01 Weeks 6 Days         
                                           
          Click a down arrow icon          
              to enter a date.             
                                           
         Ok        Help      Cancel     
                   
 ͼ

This display shows that the ultrasound EDC should be accepted over the LMP
based EDC because the Difference between the two dates is clearly greater
than the SEM of  0.5 weeks.

.topic Quit
 Exit Program 
  
This {Date Calculators Menu:DateCalcMenu} choice is used to halt the program
and return to DOS or Windows. The {Hot Key:HotKeys} to exit the program is
Alt+X.

.topic CalendarMenu
 The Calendar Menu 
  
The Calendar Menu is a {Drop-Down Menu:DropDownMenu} that looks like this:

 Ŀ
  {Look at the Calendar...:LookAtCalendar} F4 
  {Set the Program Date...:SetDate}    
 

You may invoke the Calendar Menu by using the {Menu Bar:MenuBar} commands.
With the Calendar Menu on the screen, you may invoke any of the Calendar Menu
choices by using the Drop-Down Menu commands.

.topic LookAtCalendar
 Look at the Calendar... 
  
This {Calendar Menu:CalendarMenu} choice is used to invoke the {Desk Calendar:DeskCalendar}.
The Desk Calendar allows you to view the calendar for any month in any year.

.topic SetDate
 Set the Program Date... 
  
This {Calendar Menu:CalendarMenu} choice invokes the {Date Selection Calendar:DateSelectCalendar}
to set the program date. The program date should be set to today's date.
The program reads your computer's system date when it starts and assigns the
system date to the program date. If the program date (displayed next to the
time in the upper right corner of the screen) is not today's date, then use
the Set the Program Date menu choice to set the program date.

.topic HelpMenu
 The Help Menu 
  
The Help Menu is a {Drop-Down Menu:DropDownMenu} that looks like this:

 Ŀ
  {How to Use The Help System...:HelpMenuHow}              
  {Table of Contents...:HelpMenuTOC}             Shift+F1  
  {Date and Calendar Documentation:HelpMenuDocument}            
  {About...:HelpMenuAbout}                                   
 

You may invoke the Help Menu by using the {Menu Bar:MenuBar} commands. With
the Help Menu on the screen, you may invoke any of the Help Menu choices by
using the Drop-Down Menu commands.

.topic HelpMenuHow
 How to Use The Help System... 
  
This {Help Menu:HelpMenu} choice is used to invoke the {Help System:Help}
Help Window with a help topic that describes how to use the Help System.

.topic HelpMenuTOC
 Table of Contents... 
  
This {Help Menu:HelpMenu} choice is used to invoke the {Help System:Help}
Help Window with the {Table of Contents:TOC}. The Table of Contents is a
special Help System "topic" that consists of an alphabetical list of Help
System topics. Each Help System topic listed in the Table of Contents
is in the form of a {Related Help Topic:RelatedTopic}. Therefore, you may use
the Table of Contents to look up and view any help topic in the Help System.

The {Hot Key:Hotkeys} is the Shift+F1 {Key Combination:KeyCombo}.

.topic HelpMenuDocument
 Date and Calendar Documentation 
  
This {Help Menu:HelpMenu} choice is used to invoke the {Help System:Help}
Help Window with a help topic that documents the date and calendar
objects in the DATES.PAS and CALENDAR.PAS units.

.topic HelpMenuAbout
 About... 
  
This {Help Menu:HelpMenu} choice is used to invoke the Author Notice Dilog
Box.

.topic InputLine
 Input Lines 
  
An input line is a {View} that is used to input text of some sort. Dysplasia
Tracker uses input lines in several places. The patient's last and first
name, the patient's address, the names of the providers, the clinic address
and other data are all input via the input line.

An input line must have the program {Focus} before you can enter data.
Data is entered into the input line by simply typing it. The input line has
some {Editing Facilties:EditInputLine} that make it easier to correct any
errors. The input line appears on the screen as a large block that is
labeled to identify what needs to be entered. For example:

 First Name:  

When an input line has the program {Focus}, the cursor (the blinking
underline or blinking rectangle on the screen) will be visible in the block.
The cursor marks the location where the next character that you type will
appear in the input line. Simply type the information that is requested and
press the Tab key to shift the program focus to the next data input view.

If there is already text in the input line when it is focused, the existing
text will be {Selected:SelectedText}. If you want to delete the existing
text and type something else, just start typing and the selected text will
be deleted. If you wish to modify the existing text, you must first deselect
it. To deselect the text, press the Right Arrow key one time and proceed to
modify the existing text using the {Input Line Editing Facilties:EditInputLine}.

Input lines have a limit to the number of characters that you can type. When
you hit the limit, the input line will ignore any further characters that you
type. Usually, that limit is less than or equal to the number of characters
that will fit into the block that represents the input line on the screen. In
some cases, the limit on the number of characters that you can type will be
greater than the size of the block. This means that you can type text that is
longer than the block. The input line, however, can only display as much text
as will fit in the block (actually two less than that).

When you type more text than the input line can display, the input line will
display as much as it has room to display and will "hide" the rest. When the
input line is hiding text, it places "arrowhead" markers at the ends of the
block. You may inspect the hidden part of the text by pressing the Left and
Right Arrow keys or by {Mouse Clicking:Mouse} the arrowheads.

.topic EditInputLine
 Editing Input Lines 
  
The {Input Line:InputLine} has editing facilities that make it easier to
correct errors or modify an existing entry. The cursor is the blinking
underline or blinking rectangle on the screen. The cursor is where the next
character will appear as you type. Use the {Cursor Movement Commands:MoveCursor}
to move the cursor to the place where you want to make corrections. Errors
may be corrected by a combination of overwriting, inserting or deleting.

1.  Overwriting. When the cursor is in the shape of a rectangle, the input
line is in overwrite mode. In overwrite mode, the characters that you type
take the place of the existing text. If you had typed "overwryte," you could
correct it by moving the cursor to the "y," switching the input line mode
to overwrite and pressing the "i" key. The "i" replaces the "y" to make
"overwrite." The input line is switched between insert and overwrite mode by
pressing the Insert key.

2.  Inserting. When the cursor is in the shape of an underline, the input
line is in insert mode. If you typed "insrt" and ment to type "insert," you
could move the cursor to the letter "r" and press the "e" key. The "e" would
be inserted between the "s" and the "r" to make "insert." The input line is
usually in insert mode. The input line is switched between insert and
overwrite mode by pressing the Insert key.

3.  Deleting. The Backspace key erases the character behind (to the left)
of the cursor. The Delete key erases the character on which the cursor is
sitting. A block of {Selected:SelectedText} text may be deleted. Text may
be selected by Shift+Left Arrow, Shift+Right Arrow or {Mouse Dragging:MouseDrag}.
Once a block of text has been selected, you may deselect it by pressing the
Left or Right Arrow key. Pressing any other key will cause the selected text
to be deleted.

.topic SelectedText
 Text Selection Commands 
  
Text in an {Input Line:InputLine} may be "selected." Text is selected to
delete it. Text shows that it has been selected by being highlighted, i.e.,
by being a different color than other text. To select text, first use the
{Cursor Movement Commands:MoveCursor} to place the cursor at the beginning
of the text that you want to select. Once the cursor is positioned, there
are different ways to select text.

1.  Shift+Left Arrow & Shift+Right Arrow:  The cursor will move just like it
would for a {Cursor Movement Command:MoveCursor} except that the text that
the cursor moves over will be highlighted to indicate that it is selected.

2.  {Mouse Dragging:MouseDrag}:  Point the mouse cursor at the first
character that you want to select. Press the left mouse button, hold it down,
move the mouse cursor to the last character that you want to select and
release the mouse button. Every character between the first and last
selected characters will be selected.

Once text has been selected, you must either do something with the selected
text or deselect it. You may "deselect" the selected text by pressing a
cursor movement key or by mouse clicking the text. If you press any key
except a cursor movement key, the selected text will be deleted.

.topic MouseDrag
 Mouse Dragging 
  
Dragging is a {Mouse} operation. Mouse dragging is used for three purposes:

1.  To {Select Text:SelectedText}.

2.  To move a window or dialog box to another location on the screen.

3.  To resize a window.

Select a block of text in an {Input Line:InputLine} by pointing the mouse
cursor to the start of the text that you want to select, pressing the left
mouse button, holding it down, moving the mouse pointer to the end of the
text that you want to select and releasing the mouse button. The selected
text will be highlighted, i.e., it will be a different color than the rest
of the text. Delete the selected text by pressing the Delete key.

Drag a window or dialog box to another location by moving the mouse pointer
to the top line of the window or {Dialog Box:Dialog} (avoiding any {Icons}),
pressing the left mouse button, holding it down, moving the window or dialog
box to the desired location and releasing the mouse button. The window or
dialog box frame will change appearance while it is being dragged.

Resize a window by dragging its {Window Resizing Icon:Icons}, i.e., position
the mouse pointer on the Window Resizing Icon, press the left mouse button,
resize the window by moving its lower right corner and release the mouse
button.

.topic HotKeys
 Hot Keys 
  
Hot Keys are specially designated keys or {Key Combinations:KeyCombo} that
bypass the {Menu System:MenuSystem} to directly invoke a program
task or shift the {Focus} to a {Label's:Labels} associated {View} when
pressed. Many {Drop-Down Menu:DropDownMenu} choices have hot keys associated
with them.

Hot keys are often {Function Keys:FunctionKey} or {Key Combinations:KeyCombo}.
An Alt key combination with a {Highlighted} letter is used as a hot key by
the Menu Bar and by {Labels} in {Dialog Boxes:Dialog}.

.topic FunctionKey
 Function Keys 
  
The function keys are a group of keys located on the top of the keyboard
that look like this:

 Ŀ    Ŀ    
  F1  F2  F3  F4      F5  F6  F7  F8      F9  etc.
         

The function keys may be grouped on the left side of the keyboard on some
older models. Older keyboards will have ten function keys. Newer keyboards
have twelve function keys. The Function keys are often used as {Hot Keys:HotKeys}.

A function key may be used by itself or may be used as part of a
{Key Combination:KeyCombo} with another key. Using a function key as a key
combination is a way of getting more "milage" out of the function keys. If
you press the "Shift" key, hold it down and press the F1 function key,
the program will treat this as an entirely different key.

The key combination of the Shift key and the F1 function key is referred to
as the "Shift+F1" key. The F1 key by itself is referred to as the "Help"
key, because it is the hot key for the {Help System:Help}. The Help key
invokes the help system to appear with a context-specific help topic in the
Help Window. Shift+F1 is called the "Shift+Help" key. The Shift+Help key
invokes the help system to appear with the Help System's {Table of Contents:TOC}
in the Help Window.

Two other keys may be used with the function keys to make new keys:  The
"Alt" key and the "Ctrl" key. Therefore, each function key may be pressed in
four different ways that the program will interpret as four different
keys:

 F1
 Shift+F1
 Alt+F1
 Ctrl+F1

Even if your keyboard has only ten function keys, the Shift, Alt and Ctrl
keys allow the program to act as if you have forty function keys.

.topic KeyCombo
 Key Combinations 
  
Key combinations are keyboard operations where you press the Shift, Alt or
Ctrl key, hold it down, press some other key and then release both keys.
Anyone familiar with a typewriter is familar with the Shift key. The Shift
key does nothing by itself, but it changes the way that other keys operate.
If you press the Shift key, hold it down, and press a letter key, it will
cause the letter key to type an upper case letter rather than a lower case
letter.

There are two similar keys on the keyboard, the "Alt" (i.e., "alternate") key
and the "Ctrl" (i.e., "control") key. Like the Shift key, neither the Alt key
nor the Ctrl key do anything when pressed alone. However, the Alt key and
Ctrl key change the operation of other keys. An Alt key combination is keyed
by pressing the Alt key, holding it down, and pressing some other key. A
Ctrl key combination is keyed by pressing the Ctrl key, holding it down, and
pressing some other key.

The following notation is used to describe key combinations:

1.  "Shift+[key]" is used to describe shifted keys, for example, "Shift+F1"
means to press the Shift key, hold it down, press the "F1" {Function Key:FunctionKey}
and release both keys.

2.  "Alt+[Key]" is used to describe "Alt" keys, for example, "Alt+X" means to
press the Alt key, hold it down, press the "X" key and release both keys.

3.  "Ctrl+[Key]" is used to describe control keys, for example, "Ctrl+C"
means to press the Ctrl key, hold it down, press the "C" key and release
both keys.

4.  "Ctrl+[Key][Key]" is a variation of the control keys described in number
three above. For example, "Ctrl+QY" means to press the Ctrl key, hold it
down, press the "Q" key, release it, press the "Y" key and release both keys.

Various key combinations, along with the {Function Keys:FunctionKey} are
used as {Hot Keys:HotKeys} for {Drop-Down Menu:DropDownMenu} choices and
as hot keys for {Cursor Movement Commands:MoveCursor}.

"Alt+[Key]" combinations with {Highlighted Letters:Highlighted} are often
used to invoke {Menu Bar:MenuBar} choices or to shift the {Focus} to a
particular {View} in a {Dialog Box:Dialog}.

.topic MoveCursor
 Cursor Movement Commands 
  
The cursor is the blinking underline or blinking rectangle on the screen that
shows where the next character will typed in the {Input Line:InputLine}. You
may move the cursor to a different location on the screen without erasing or
adding characters by using the cursor movement commands.

Press the Zoom key ("F5") to zoom this Help Window to full size so that you
can read all of the information below:

1.  Left Arrow & Right Arrow:  These keys move the cursor left and right.

2.  Ctrl+S & Ctrl+D:  Alternate keys for Left & Right Arrow.

3.  Ctrl+Left Arrow & Ctrl+Right Arrow:  These {Key Combinations:KeyCombo}
    move the cursor to the extreme left and extreme right end of the input
    line entry.

4.  Ctrl+A & Ctrl+F:  Alternate keys for Ctrl+Left & Ctrl+Right Arrow.

5.{Mouse Click:Mouse}:  Moves the cursor to the character that was clicked.

.topic Highlighted
 Highlighted Letters 
  
Certain letters (or even digits) in the words that make up the
{Menu System:MenuSystem}, {Dialog} boxes, {Buttons} and {Labels} are a
different color than the other letters. These are called highlighted
letters. The highlighted letters are used to invoke {Menu Bar:MenuBar}
choices, {Drop-Down Menu:DropDownMenu} choices, to push buttons or to shift
the program's {Focus} to a particular {View} via the view's label. You
can invoke a menu choice, push a button or shift the program's focus to a
particular view by pressing the Alt {Key Combination:KeyCombo} for the
highlighted letter.

In some circumstances, you can invoke the action associated with a
highlighted letter by simply pressing the key for the highlighted letter
without using its Alt key combination. Certain {Views:View} are used for
entering data such as names, addresses, etc. If the program's {Focus}
is on such a view, then that view will assume that any letters or digits
that you type are intended for itself. Therefore, letters and digits will be
intercepted by the focused view before they ever get to a {Button:Buttons}
or a {Label:Labels}. However, all views except the Menu System, buttons and
labels will ignore Alt key combinations for letters and digits. In summary,
if the focus is on a view that expects you to type letters or digits, the
focused view will grab them before they have a chance to go to any other
view, so you must use the Alt key combination of the highlighted letter. If
the focus is on a view that will not grab any letters that you type, you can
use the highlighted key without the Alt key.

.topic View
 Views 
  
Everything that appears on the program's screen is a "view." The
{Menu Bar:MenuBar}, {Drop-Down Menus:DropDownMenu}, {Dialog Boxes:Dialog},
{Buttons}, etc. are all views. In order for you to enter data in a view,
such as an input line, you must shift the {Focus} to that view.

You will understand views and focus better if you understand something about
the programming methods used in this program. This program was
written using "Object Oriented Programming" (OOP) techniques. From a
programming standpoint, a view is an "object." An object is a packet of data
that is tightly bound to a set of computer instructions called "methods."
Because its methods give it "intelligence," objects are capable of acting
independently if the program passes control to it.

OOP Programmers tend to anthropomorphize their objects, i.e., they tend to
think of them in almost human terms. A good analogy to an object oriented
program is a stage production involving many different actors. It is not
necessary for the director (i.e., the program), or even the other actors
(i.e., other objects) to know another actor's lines (i.e., another object's
methods). It's only necessary for the director or the other actors to know
when to cue (i.e., pass control to) an actor who will then say his or her
lines (i.e., do the object's job).

A view, such as an input line, is an object that may function independently
and on cue like the stage actor in the above illustration. The input line
knows how to read characters from the keyboard and has methods that allow
the program operator to "edit" the entry. Input lines are used for a variety
of data entry tasks by a program, for example reading a person's name. The
program does not need to know the nitty-gritty details of how to read and
edit a person's name. It simply creates an input line object and instructs
it to draw itself on the screen as a view. The program then passes control
to the input line when it is time to read the name.

Some views are actually a collection of several different views. Referring
again to the analogy of a stage production, more than one actor can be
on-stage at the same time. A dialog box is such a view. A typical dialog box
consists of several views: A Frame, {Icons}, {Input Lines:InputLine},
{Buttons}, etc. The program passes control (i.e., focus) to the dialog box.
The dialog box then passes the focus to one of its views. The focused view
will generally show that it has the focus by highlighting itself in some way.
You may shift the focus from one view to another by pressing the Tab key or
by pressing the Shift+Tab {Key Combination:KeyCombo}.

Some views are incapable of accepting the focus. For example, static text is
a view, but its only purpose is to serve as explanatory text. It would not
be useful to pass the focus to a view that does nothing.

.topic Focus
 Program Focus 
  
The simplest way to think of program focus is that it is program control.
You may interact with many of the {Views:View} that are on the screen. For
example, you may enter data into a type of view called an {Input Line:InputLine}.
Before you can enter data into an input line, the input line must have the
focus, i.e., the program must pass program control to the input line.
A view shows that it has the focus by highlighting itself in some way and/or
by the appearance of the cursor in the view (the cursor is the blinking
underline or blinking rectangle on the screen). To shift the focus to a
given view, press the Tab key until the desired view is highlighted and/or
gains the cursor.

The Tab key tells a view to relinquish the focus and pass it to the next
view. When there is more than one view on the screen, the views have an
order to them. This order is called the "Z-order." When a view relinquishes
the focus and passes it to the next view, it passes it to the next view in
Z-order. The Shift+Tab key (i.e., press the Shift key, hold it down and
press the Tab key) also tells the focused view to relinquish the focus, but
passes it to the preceeding view in Z-order. Therefore, you may shift the
focus to a given view by pressing Tab or Shift+Tab until the focus is passed
to the desired view.

There are other ways to shift the focus to a given view. Mouse clicking a
view will shift the focus to that view. Many views have a special type of
view associated with it. This view is called a {Label:Labels}. When you
mouse click a label, the focus is shifted to the label's associated view,
rather than to the label itself. Pressing the Alt {Key Combination:KeyCombo}
for the label's {Highlighted Letter:Highlighted} will also shift the focus
to the label's associated view.

.topic Dialog
 Dialog Boxes 
  
A dialog box is a {View} that looks like a rectangle on the screen. Most of
the "action" in the program takes place in dialog boxes. The function
of dialog boxes can be reduced to four operations:

1.  To input data. All data that you enter into the program is entered
via dialog boxes.

2.  To advise you of something, such as a warning or an error message.

3.  To ask you a question such as "Is the printer ready?"

4.  To further refine a task.

A typical dialog box might look like this:

 [] Enter the Name ͻ
                                      
    Enter the patient's name below:   
                                      
  Last  Name:   
  First Name:   
                                      
            Ok        Cancel        
                      
 ͼ

This hypothetical example is used to enter a person's last and first name.
This dialog box has nine different views:

 1.  The rectangular frame that surrounds the dialog box.
 2.  The Close {Icon:Icons} in the upper left corner, i.e., "[]".
 3.  {Static Text:StaticText}, i.e., "Enter the patient's name below:."
 4.  A {Label:Labels} for the last name.
 5.  An {Input Line:InputLine} for the last name (the block after the label).
 6.  A label for the first name.
 7.  An input line for the first name (the block after the label).
 8.  An "Ok" {Button:Buttons}.
 9.  A "Cancel" Button.

You CANNOT shift the focus to the frame, the Close Icon, the static text,
the last name label or the first name label. You CAN shift the focus to the
two input lines and the two buttons. To enter the last name, shift the
{Focus} to the input line for the last name by pressing the Tab key and
type the last name. To enter the first name, shift the focus to the input
line for the last name by pressing the Tab key and type the name. Close the
dialog box by pushing the "Ok" {Button:Buttons}. If you decide to cancel
this data entry operation, push the "Cancel" button.

Dialog boxes may contain almost any combination of views, but still operate
about the same. That is, to enter data in a given view, shift the focus to
that view and then close the dialog box by pushing the Ok button.

.topic StaticText
 Static Text 
  
Static text is a {View} that is designed to draw itself on the screen in a
{Dialog Box:Dialog} in order to explain something about the dialog box.
Static text is similar to a {Label:Labels}, except that a label has a
{Highlighted Letter:Highlighted} and is associated with another view.

.topic Icons
 Icons 
  
Icons are symbols on the screen that carry out certain functions when they
are {Mouse} clicked. Icons are usually found in the frame of windows or
{Dialog Boxes:Dialog} and are usually enclosed in square brackets. Icons can
sometimes appear in association with other {Views:View}, for example there
is an icon associated with the {Date Input View:DateInputView}. Commonly
encountered icons and their functions are described below:

1. The Close Icon is located in the upper left corner of the {Help Window:Help},
and all {Dialog Boxes:Dialog}. The Close Icon looks like a small square
enclosed in square brackets. The Close Icon causes the Help Window. The
Close Icon causes a dialog box to close, but it closes as if you had pressed
the "Cancel" {Button:Buttons}.

2.  The Zoom Icon is found in the upper right corner of the Help Window.
Dialog boxes do not have a Zoom Icon. The Zoom Icon looks like
an upwards pointing arrow enclosed in square brackets when its window is not
expanded to its maximum dimensions and like a double-headed up and down
arrow when its window is expanded to its maximum dimensions. The Zoom Icon
causes the Help Window to expand to their maximum dimensions. If the Help
Window are already expanded to their maximum dimensions, mouse clicking the
Zoom Icon will cause them to assume their previous dimensions.

3.  The Window Resizing Icon is located at the lower right corner of the
Help Window. Dialog boxes do not have a Window Resizing Icon. The Window
Resizing Icon is the lower right corner itself and it is not enclosed in
square brackets like most other icons. The Window Sizing Icon must be
{Mouse Dragged:MouseDrag}, rather than mouse clicked.

4.  The {Scroll Bars:ScrollBars} are sets of icons found in the Help Window
and the Date Selection Calendar.

5.  The Date Selection Calendar Icon is found in {Date Input Views:DateInputView}.
It is located on the right end of the date input view and looks like a down
arrow between two lines. Mouse clicking the Date Selection Calendar Icon
shifts the focus to the Date Input View and invokes the Date Selection
Calendar.

6.  The {Date Selection Calendar:DateSelectCalendar} has its own set of
icons.

.topic ScrollBars
 Scroll Bars 
  
Scroll Bars are found in the Help Window and the Date Selection Calendar.
The Scroll Bar consists of a set of {Icons} that are used to scroll the Help
Window and the Date Selection Calendar. The scroll bars operate somewhat
differently in the Date Selection Calendar than they do in the Help Window.

The Vertical Scroll Bar is located on the right side of the Help Window
It scrolls text up and down. The Vertical Scroll Bar icons look
approximately like this:

  <-- Up Arrow Icon   = Scroll text up one line.
  <-- Page Up Icon    = Scroll text up one page.
  <-- File Position Marker.
  <-- Page Down Icon  = Scroll text down one page.
  <-- Down Arrow Icon = Scroll text down one line.

Mouse clicking the various icons causes the Help Window text to scroll as
indicated. {Mouse Dragging:MouseDrag} the File Position Marker up
or down will cause the Help Window text to scroll up or down.

The Horizontal Scroll Bar is almost identical to the Vertical Scroll Bar
except that it is found on the bottom line of the Help Window. The Horizontal
Scroll Bar scrolls text left and right rather than up and down when its icons
are clicked and its File Position Marker is mouse dragged.

Refer to the {Date Selection Calendar:DateSelectCalendar} help topic for
details on how the scroll bars operate in the Date Selection Calendar.

.topic Labels
 Labels 
  
A label is a {View} in a {Dialog Box:Dialog} that is associated with another
view. The associated view is generally located immediately below or to the
right of the label. The label is similar to {Static Text:StaticText} in that
it explains something about its associated view. However, static text is not
associated with any other view. Labels have a {Highlighted Letter:Highlighted}.
When the label's highlighted letter is used as an Alt {Key Combination:KeyCombo},
or when the label is {Mouse} clicked, the {Focus} is shifted to the label's
associated view. A label itself cannot be focused. However, it highlights
itself whenever its associated view has the focus.

.topic Buttons
 Buttons 
  
A button is a {View} that is found exclusively in {Dialog Boxes:Dialog}. A
button is a small, colored rectangle that has a mark along the bottom and
right side that gives it a three dimensional look. Buttons have a word on
them that identifies their purpose. A button carries out some sort of action
when it is "pushed."

There are several ways to push a button. The Enter key is used to push
buttons. The button that is pushed by the Enter key depends on where the
{Focus} is located and which button is the "default" button. If the focus
is on a button, the Enter key will push the focused button. A button shows
that it has the focus by highlighting itself.

If the focus is not on any button, the Enter key will push the default
button. One button is always the "default" button. The default button is
usually the leftmost or top button in a group of buttons. If the focus is
on any other view that is not a button, an {Input Line:InputLine} for
example, the default button will show itself by being faintly highlighted.

Buttons have a word label that describes its function in some way. One
letter in the label is {Highlighted}, i.e., a different color than the other
letters. Another way to push a button is to press the key for its
highlighted letter. This may not always work. If the focus is on a view that
is expecting you to type letters or numbers, such as an input line, then
that view will assume that any letters that you type are intended for
itself. That is, they will be intercepted before they can even be seen by a
button. If, however, the currently focused view could care less about
letters that you type, then pressing a button's highlighted letter will push
that button.

If the focus is on a view that will "eat" letters, you can still push a
button by pressing its highlighted letter, but, only if you press the
highlighted letter as an Alt {Key Combination:KeyCombo}.

Finally, you may push any button by {Mouse} clicking it.

Some buttons serve a unique function, but there are several buttons that you
will see throughout the program:

1.  The "Ok" Button:  Pushing the Ok button is how you tell a dialog box
that you are finished with it. Therefore, pushing the Ok button will close
the dialog box. Closing a dialog box with the Ok button will often cause
something to occur. For example, when you use the Ok button to close the
dialog box that allows you to enter or update a patient's data, the
patient's data file record is updated to reflect the changes that you made
in the dialog box. Most dialog boxes will have an Ok button. When it is
present, the Ok button is almost always the default button. The letter "O"
is the highlighted letter for the Ok button.

2.  The "Cancel" Button:  Pushing the Cancel button is similar to pushing
the Ok button in that it will close a dialog box. However, the Cancel button
will cancel the action that would have been carried out if the dialog box
had been closed with the Ok button. For example, if you use the Cancel
button to close the dialog box that allows you to enter or update a
patient's data, any changes that you made will be discarded. If you end up
in a dialog box by mistake, push the Cancel button. The Cancel button does
not have a highlighted letter, because it has a special key that is reserved
for it. The Escape key will push the Cancel button, even if it does not have
the focus. The Escape key will cancel a dialog box even if there is no
Cancel button in the dialog box.

3.  The "Yes" Button & the "No" Button:  The Yes and No buttons usually
appear together with a Cancel button. A typical place to see these buttons
is in a dialog box that asks a simple Yes/No question. For example:  "Is the
printer ready?" You deal with this dialog box by pushing the Yes or No
button. This type of dialog box will not contain an Ok button because "Ok"
does not make sense as an answer to a Yes/No question.

"Yes" is usually the default button, because the program usually
expects you to answer Yes to such a question. If the program expects
you to answer "No," then No will be the default button. With the expected
answer as the default button, you can get past most such dialog boxes by
simply pressing the Enter key which pushes the default button. "Y" is the
highlighted key for the Yes button and "N" is the highlighted key for the No
button.

.topic RadioButtons
 Radio Buttons 
  
Radio buttons are a specialized {View}. Radio buttons only appear in
{Dialog Boxes:Dialog}. Radio buttons allow you to select one and only one
item from a list. A hypothetical set of radio buttons might look like this:

  Civil Status:
 Ŀ
  ( ) Unknown.        (*) Separated. 
  ( ) Never Married.  ( ) Divorced.  
  ( ) Married.        ( ) Widowed.   
 

The list of items will appear in a block-like space in a dialog box. Each
item consists of a descriptive word or phrase and is preceeded by a pair of
parentheses. One item in the list will always be "selected." The selected
item will be marked with a marker between the item's parentheses. In the
example above, "Separated" is the selected item. When radio buttons have the
{Focus}, the selected item will be highlighted, i.e., a different color than
the other items.

You may select any item in the list by shifting the focus to the radio
buttons and pressing the Up, Down, Left and Right Arrow keys. The Arrow
keys will shift the highlighting and the selection marker to another item.
One letter in the word or phrase that describes each item will be
highlighted, i.e., will be a different color than the other letters. When
the focus is on a set of radio buttons, you may directly select an item in
the list by pressing the key for the item's {Highlighted Letter:Highlighted}.

If the focus is not on the radio buttons, it still may be possible to select
an item by pressing the key for its highlighted letter. It depends on what
type of view has the focus. If the focus is on a view that is expecting
you to type letters or numbers, such as an input line, then that view will
assume that any letters that you type are intended for itself. That is, they
will be intercepted before they can even be seen by the radio buttons. If,
however, the currently focused view could care less about letters that you
type, then pressing a radio button item's highlighted letter will shift the
focus to the radio buttons and select that item.

If the focus is on a view that will "eat" letters, you can still select a
radio button item by pressing its highlighted letter, but, only if you press
the highlighted letter as an Alt {Key Combination:KeyCombo}.

Finally, you may select any radio button item by {Mouse} clicking it.

.topic CheckBoxes
 Check Boxes 
  
Check boxes are a specialized {View}. Check boxes only appear in
{Dialog Boxes:Dialog}. Like {Radio Buttons:RadioButtons}, check boxes
present you with a list of items from which to choose. With radio buttons,
one and only one item can and must be chosen from the list. Unlike radio
buttons, check boxes allow you not select any of the items, or to select
one item or to select several items from the list. A hypothetical set of
check boxes might look like this:

  Extra Toppings:
 Ŀ
  [ ] Pepperoni       [X] Green Peppers  
  [X] Italian Sausage [ ] Canadian Bacon 
  [X] Mushrooms       [ ] Anchovies      
 

The list of items will appear in a block-like space in a dialog box. Each
item consists of a descriptive word or phrase and is preceeded by a pair of
square brackets. Any number of the items may be "selected." The selected
item(s) will be marked with an "X" marker between the item's square
brackets. In the example above, "Italian Sausage," "Mushrooms" and "Green
Peppers" have been selected. When check boxes have the {Focus}, one of the
items will be highlighted, i.e., a different color than the other items.
You may select or deselect the focused item by pressing the Space Bar. The
Space Bar "toggles" a check box item from selected to deselected or from
deselected to selected depending on it's current state. When you deselect a
check box item, the "X" in the item's square brackets will disappear. You
may shift the focus to a different item in the check boxes by pressing the
Up, Down, Left or Right Arrow keys and then select or deselect that item by
pressing the Space Bar.

One letter in the word or phrase that describes each check box item will be
highlighted, i.e., will be a different color than the other letters. When
the focus is on a set of check boxes, you may directly select or deselect
an item by pressing the key for the item's {Highlighted Letter:Highlighted}.

If the focus is not on the check boxes, it still may be possible to select
or deselect an item by pressing the key for its highlighted letter. It
depends on what type of view has the focus. If the focus is on a view that
is expecting you to type letters or numbers, such as an input line, then
that view will assume that any letters that you type are intended for
itself. That is, they will be intercepted before they can even be seen by
the check boxes. If, however, the currently focused view could care less
about letters that you type, then pressing a check box item's highlighted
letter will shift the focus to that check box item and select or deselect
that item.

If the focus is on a view that will "eat" letters, you can still select or
deselect a check box item by pressing its highlighted letter, but, only if
you press the highlighted letter as an Alt {Key Combination:KeyCombo}.

Finally, you may select or deselect any check box item by {Mouse} clicking
it.

.topic StatusLine
 The Status Line 
  
The Status Line is the bar-like structure at the bottom of the program's
screen. The Status Line looks much like the Menu Bar at the top of the
screen.

The Status Line serves three purposes:

1.  To advise you of where you are in the program.

2.  To provide short-cuts to the most commonly used program commands.

3.  To help you to navigate the Help System.

As you operate the program, you will notice that the Status Line
changes. This is how the Status Line informs you of where you are and what
you are doing in the program. The Status Line contains a list of the most
commonly used program commands, along with their {Hot Keys:HotKeys}. You
may invoke these commands by either using their hot keys or by simply
{Mouse Clicking:Mouse} the command on the Status Line. Often times, the
Status Line will only offer one command, the Help command and its hot key,
the "F1" function key. This is to remind you that you may obtain help from
the Help System for the current program command or dialog box by simply
pressing the Help key. The rest of the text in the Status Line describes
what is going on or what Help System Topic will appear in the Help Window
when you press the Help key.

.topic Mouse
 Instructions for Mouse Users 
  
The program has program "bindings" that allow you to use a mouse to
operate the program. Before you can use the mouse, your computer must have
a mouse, and a special program called a "mouse driver" must be running in the
background. The mouse and mouse driver must be able to operate with MS-DOS
programs in text mode.

If your mouse doesn't seem to work, look in your AUTOEXEC.BAT file to see if
it contains the following line:

 MOUSE

If not, then look in your CONFIG.SYS file to see if it contains a line that
looks something like this:

 DEVICE=C:\DOS\MOUSE.SYS

Try putting one or the other of these lines in the appropriate files, save
them and restart the computer. If this doesn't work or if you feel skittish
about playing with the AUTOEXEC.BAT or CONFIG.SYS files, call your systems
consultant.

A mouse can make it much easier to use the program. When your mouse is
working correctly, a small rectangle will appear on the screen and it will
move when you slide your mouse around. The rectangle is called the "mouse
pointer" or the "mouse cursor." You operate the program by pointing
the mouse pointer at various {Views:View} on the screen and "clicking" them.
To click a view, move the mouse until the mouse pointer is on the view and
then press the left button on the mouse. Another way to use the mouse in
the program is to "mouse drag." Mouse dragging is used to
{Select:SelectedText} text in {Input Lines:InputLine}. Point the mouse
pointer at the beginning of the text that you want to select. Press the left
mouse button, hold it down, point the mouse pointer to the end of the text
that you want to select and release the mouse button. The selected text will
be a different color than the rest of the text in the view.

.topic TOC
 The Table of Contents 
  
 {About...:HelpMenuAbout}
 {Age Calculator...:Age}
 {Age Calculator Dialog Box:AgeCalc}
 {Buttons}
 {Calendar Menu:CalendarMenu}
 {CALENDAR.PAS Unit:Calendar}
 {Check Boxes:CheckBoxes}
 {Date and Calendar Demonstrator:Document}
 {Date and Calendar Theory:Theory}
 {Date Calculators Menu:DateCalcMenu}
 {Date Difference...:Difference}
 {Date Difference Calculator Dialog Box:DifferenceCalc}
 {Date Input View:DateInputView}
 {Date Selection Calendar:DateSelectCalendar}
 {DATES.PAS Unit:Dates}
 {Desk Calendar:DeskCalendar}
 {Dialog Boxes:Dialog}
 {Drop-Down Menus:DropDownMenu}
 {Editing Input Lines:EditInputLine}
 {EDC Calculator...:EDC}
 {EDC Calculator Dialog Box:EDCCalc}
 {Exit Program:Quit}
 {Focus}
 {Function Keys:FunctionKey}
 {Gestation Calculator...:Gestation}
 {Gestation Calculator Dialog Box:GestationCalc}
 {Help Menu:HelpMenu}
 {Help System:Help}
 {Help Window Focus:HelpFocus}
 {Highlighted Letters:Highlighted}
 {Hot Keys:HotKeys}
 {How to Use The Help System...:HelpMenuHow}
 {Icons}
 {Input Lines:InputLine}
 {Key Combinations:KeyCombo}
 {Labels}
 {Look at the Calendar...:LookAtCalendar}
 {Menu Bar:MenuBar}
 {Menu System:MenuSystem}
 {Month and Year View:MonthYearView}
 {Mouse Users Instructions:Mouse}
 {Mouse Dragging:MouseDrag}
 {Radio Buttons:RadioButtons}
 {Related Help Topic:RelatedTopic}
 {Scroll Bars:ScrollBars}
 {Set the Program Date...:SetDate}
 {Static Text:StaticText}
 {Status Line:StatusLine}
 {Table of Contents...:HelpMenuTOC}
 {Views:View}

.topic HelpWindow

 This is a dummy help topic that only serves the purpose of creating a help
 context constant named "hcHelpWindow" that is used to provide a help
 context for a status line for the help window.

.topic MonthYearView=1452
 The Month and Year View 
  
The month and year {View} allows you to enter a month and year. If you
attempt to simply type the month and year, you will be ignored. To set the
month and year view to a particular month and year, shift the {Focus} to the
view and press the Down or Up Arrow keys until the desired month and year
appear. You may also change the month and year view by pressing a digit key.
For example, if the month is set to January and you press the "4" key, the
month and year view will change to May, i.e., the month that is four months
from January.

You may also change the month in the month and year view by {Mouse} clicking
it. If the focus is not on the month and year view, the first mouse click
will shift the focus to the view without changing it. With the focus on the
view, the left mouse button changes the month to the next month and the right
mouse button changes the month to the previous month.

.topic DeskCalendar
 The Desk Calendar 
  
The Desk Calendar is a {Dialog Box:Dialog} that displays the calendar. By
pressing various keys or {Mouse} clicking various {Icons}, you can shift the
calendar to any month in any year. Close the Desk Calendar by clicking
the Close Calendar Icon, by pressing the Enter key or by pressing the Escape
key.

The Desk Calendar cannot be EXACTLY reproduced in the Help Window for
technical reasons. However, a close approximation is drawn below with the
major parts labeled:

                                       Subtract Century Icon
                                       Subtract Decade Icon
                                       Select today's Date Icon
                                       Add Decade Icon
 Close Calendar IconĿ               Add Century Icon
                    [] Calendar [-<*>+]
                            July 1993       
                      Su Mo Tu We Th Fr Sa  
                                   1  2  3  
                       4  5  6  7  8  9 10  Subtract Month Icon
                      11 12 13 14 15 16 17  
                      18 19 20 21 22 23 24  Add Month Icon
                      25 26 27 28 29 30 31  
                                            
                    <>
                       
  Subtract Year Icon         Add Year Icon

If the month that you desire is not displayed by the Desk Calendar, you
can shift the Desk Calendar to a different month by mouse clicking the Add
Month Icon or Subtract Month Icon. Pressing the Page Down and the Page Up
key is equivalent to clicking the Add Month Icon and Subtract Month Icon
respectively.

The Ctrl+Page Up {Key Combination:KeyCombo} will shift the month to January.
The Ctrl+Page Down key combination will shift the month to December. There
are no equivalent icons for these two commands.

If the calendar that you desire is not in the year displayed by the Desk
Calendar, you can shift the Desk Calendar to a different year by mouse
clicking the Add Year Icon or Subtract Year Icon. Pressing the Ctrl+Right
Arrow key combination and the Ctrl+Left Arrow key combination is equivalent
to clicking the Add Year Icon and Subtract Year Icon respectively.

If the year that you desire is more than five years away, mouse click the
Add Decade Icon or Subtract Decade Icon until the year is close to the
desired year then click the Add Year Icon or Subtract Year Icon until the
desired year appears. Pressing the ">" (i.e., "greater than symbol") key and
the "<" (i.e., "less than symbol") key is equivalent to clicking the Add
Decade Icon and Subtract Decade Icon respectively.

If the year that you desire is more than fifty years away, mouse click the
Add Century Icon or Subtract Century Icon until the year is close to the
desired year then click the Add Decade Icon or Subtract Decade Icon until the
year is closer to the desired year and then click the Add Year Icon or
Subtract Year Icon until the desired year appears. Pressing the "+" (i.e.,
"plus sign") key and the "-" (i.e., "minus sign") key is equivalent to
clicking the Add Century Icon and Subtract Century Icon respectively.

The Select Today's Date Icon causes the Desk Calendar to display the calendar
for the month and year of the program date. The program date should be
today's date, but may be some other date if you used the
{Set the Program Date...:SetDate} option from the {Calendar Menu:CalendarMenu}
to change the program date or if the system date on your computer is not set
to today's date. Pressing the Home key is equivalent to clicking the Select
Today's Date Icon.

The best tactic for displaying a calendar that is remote from the currently
displayed date is to shift the Desk Calendar to the desired the year first,
then shift the calendar to the desired month.

Look at the calendar for September, 1752 for practice and amusement. This
calendar appears abnormal because days three (3) through thirteen (13) are
missing. These days are missing because they were "dropped" in order to
realign the calendar with the solar year when the Gregorian Calendar
Reform was adopted by England and its colonies (including its American
colonies).

.topic DateSelectCalendar
 The Date Selection Calendar 
  
The Date Selection Calendar is a calendar inside a {Dialog Box:Dialog} that
is used for setting dates. One date in the Date Selection Calendar is
highlighted, i.e., a different color than the other dates. By pressing
various keys or {Mouse} clicking various {Icons}, you can shift the
highlighted date to any date in any month in any year. To set the date with
the Date Selection Calendar, simply highlight the desired date and press the
Enter key or click the Select Date Icon.

The Date Selection Calendar cannot be reproduced EXACTLY in the Help Window
for technical reasons. However, a close approximation is drawn below with
the major parts labeled:

                                        Subtract Century Icon
                                        Subtract Decade Icon
                                        Select Today's Date Icon
    Select Date IconĿ            Add Decade Icon
 Close Calendar IconĿ              Add Century Icon
                     [][=] Set Date [-<*>+]
                             July 1993       
                       Su Mo Tu We Th Fr Sa  Subtract Week Icon
                                    1  2  3  
    Highlighted Date{4:DateSelectCalendar}  5  6  7  8  9 10  Subtract Month Icon
                       11 12 13 14 15 16 17  Vertical Date Indicator
                       18 19 20 21 22 23 24  Add Month Icon
                       25 26 27 28 29 30 31  
                                             
                     <>Add Week Icon
   Subtract Day IconٳAdd Day Icon
  Subtract Year Icon        Add Year Icon
                                 Horizontal Date Indicator

The highlighted date may be shifted to any date in the calendar by pointing
to the desired date with the mouse cursor and clicking it. The Up, Down,
Left and Right Arrow keys will also shift the highlighted date to the date
above, below, to the left and to the right (respectively) of the currently
highlighted date. Mouse clicking the Subtract Week Icon and Add Week Icon
is equivalent to pressing the Up and Down Arrow keys respectively. Mouse
clicking the Subtract Day Icon and Add Day Icon is equivalent to pressing the
Left and Right Arrow keys respectively.

If the date that you desire to select is not in the month displayed by the
Date Selection Calendar, you can shift the Date Selection Calendar to a
different month by mouse clicking the Add Month Icon or Subtract Month Icon.
Pressing the Page Down and the Page Up key is equivalent to clicking the Add
Month Icon and Subtract Month Icon respectively.

The Ctrl+Page Up {Key Combination:KeyCombo} will shift the month to January.
The Ctrl+Page Down key combination will shift the month to December. There
are no equivalent icons for these commands.

If the date that you desire to select is not in the year displayed by the
Date Selection Calendar, you can shift the Date Selection Calendar to a
different year by mouse clicking the Add Year Icon or Subtract Year Icon.
Pressing the Ctrl+Right Arrow key combination and the Ctrl+Left Arrow key
combination is equivalent to clicking the Add Year Icon and Subtract Year
Icon respectively.

If the year that you desire is more than five years away, mouse click the
Add Decade Icon or Subtract Decade Icon until the year is close to the
desired year then click the Add Year Icon or Subtract Year Icon until the
desired year appears. Pressing the ">" (i.e., "greater than symbol") key and
the "<" (i.e., "less than symbol") key is equivalent to clicking the Add
Decade Icon and Subtract Decade Icon respectively.

If the year that you desire is more than fifty years away, mouse click the
Add Century Icon or Subtract Century Icon until the year is close to the
desired year then click the Add Decade Icon or Subtract Decade Icon until the
year is closer to the desired year and then click the Add Year Icon or
Subtract Year Icon until the desired year appears. Pressing the "+" (i.e.,
"plus sign") key and the "-" (i.e., "minus sign") key is equivalent to
clicking the Add Century Icon and Subtract Century Icon respectively.

The Select Today's Date Icon sets the Date Selection Calendar to the program
date. The program date should be today's date, but may be some other date if
you used the {Set the Program Date...:SetDate} option from the
{Calendar Menu:CalendarMenu} to change the program date or if the system date
on your computer is not set to today's date. Pressing the Home key is
equivalent to clicking the Select Today's Date Icon.

The best tactic for selecting a date in the Date Selection Calendar is to
set the year first, then the month and finally the day. When the desired date
has been highlighted, mouse click the Select Date Icon or press the Enter key
to select the highlighted date. If you ended up in the Date Selection
Calendar by mistake, click the Close Calendar Icon or press the Escape key.
The Date Selection Calendar will close without selecting any date, just as if
you had never invoked it in the first place.

.topic DateInputView
 The Date Input View 
  
This view is used to input dates. A Date input view looks like an
{Input Line:InputLine} except it contains a date and there is a down arrow
{Icon:Icons} on the right end. It looks approximately like this:

   September 18, 1994

The Date Input View will ignore you if you simply try to type the date. To
set a date, shift the {Focus} to the Date Input View and press the Down Arrow
key. This will invoke the {Date Selection Calendar:DateSelectCalendar}.
Mouse clicking the down arrow Icon at the right end of the Date Input View
will also invoke the Date Selection Calendar. The Date Input View is set to
a given date by the Date Selection Calendar.

When a Date Input View has not yet been set to a valid date, it displays
"Unknown" as the date. If the date is truely not known, then leave it as
Unknown. If you have accidently set the Date Input View to a date, but now
need to "cancel" that date, shift the focus to the Date Input View and press
the Delete key to reset the date to "Unknown."

