----------------------------------------------------------------------
Personalities

Last update: 24 July 1998

Confluent Technical Notes
Copyright (c) 1998 Confluent, Inc.  All rights reserved.
Suggestions or questions to 415-764-1000 or vthought@confluent.com.
----------------------------------------------------------------------

Visual Thought supports the notion of multiple "personalities."  A
personality is a set of Visual Thought documents that are
automatically opened during start up.  This capability allows you to
customize the look of Visual Thought for vertical applications.

For example, choosing the accident scene diagramming personality means
that Visual Thought will start up with an accident-specific basic
palette (instead of the standard one), plus a number of other palettes
and explanatory documents that allow turn-key accident diagramming.

Personalities are therefore useful for transforming Visual Thought
from a generalized diagramming and flowcharting tool into one specific
to a vertical application.


How Personalities Work
----------------------
If no personality is chosen, then by default at startup, Visual
Thought performs the following (relevant) actions:

 1. Reads all Visual Thought documents in the following directories:

      examples/definitions
      .vthought/definitions

 2. Reads basic.vpalette in the palettes directory.

 3. Reads all Visual Thought documents in the following directories:

      examples/startup
      .vthought/startup

The examples directory is in one of the following locations (assuming
Visual Thought has been installed in the default location):

  UNIX:

    /usr/local/confluent/vt-1.4/share/examples

  Windows:

    C:\Program Files\Confluent\Visual Thought 1.4\examples

The .vthought directory is in one of the following locations:

  UNIX:

    ~/.vthought

  Windows:

    The first of the following directories that is available:

      %HOME%\.vthought
      %HOMEDRIVE%%HOMEPATH%\.vthought
      C:\Program Files\Confluent\Visual Thought 1.4\.vthought

If a personality named <personality> is chosen, then Visual Thought
performs the following actions:

 1. Reads all Visual Thought documents in the following directories:

      examples/definitions/<personality>
      .vthought/definitions/<personality>

 2. Does NOT read basic.vpalette in the palettes directory.

 3. Reads all Visual Thought documents in the following directories:

      examples/startup/<personality>
      .vthought/startup/<personality>

Action 1 allows you to define shapes (cf. the technical note
note_shapedefs.txt) that are used by documents read during Action 3.


How to Adopt a Personality
--------------------------
A personality can be chosen by starting VT with the following command
line option:

  -personality <personality>

where <personality> is the name of the chosen personality or by
setting the following preference to <personality> in the Startup tab
of the Preferences dialog (choose the Options->Preferences... menu
item):

  The startup personality: the name of a subdirectory of the
  definitions and startup directories from which documents are read at
  startup.

Please see the technical note note_preferences.txt for more
information.

Be sure to press Tab after typing the name of the personality in the
text field.  This step is important to tell Visual Thought to accept
and parse the contents of the text field.

Restart Visual Thought to have your new personality take effect.

The central idea in choosing a personality is to specify the
Personality preference; this can be done in a variety of ways.  For
example, if you want a personality to be standardized throughout your
organization, simply set the Personality preference in the system
Preferences file.  For a complete discussion of preferences, please
see the technical note note_preferences.txt.

The list of defined personalities can be found, mostly, by looking for
subdirectories of the definitions and startup directories.  For
example, "Accident" is a valid personality because Visual Thought
documents defining that personality exist in the definitions/Accident
and startup/Accident subdirectories.

An exception is the examples/samples subdirectory, which is not a
valid personality.  The samples subdirectory only contains sample
shape definitions.


How to Create Your Own Personality
----------------------------------
Suppose you have a set of Visual Thought documents like the following:

 - widgets.vtdef: a set of shape definitions for special widgets.

 - widgets.vpalette: a special palette containing widgets defined in
     widgets.vtdef.

 - widget_start.vthought: a document describing how you should go
     about creating widget documents using the widgets.vpalette, perhaps
     including administration and document management procedures

And suppose that you want all people in your organization to see the
widgets.vpalette and widget_start.vthought documents on startup,
instead of the standard basic.vpalette.  Then, you can easily create
your own widgets personality by following these steps:

 1. Create the following directories:

      examples/definitions/Widgets
      examples/startup/Widgets

 2. Place widgets.vtdef into the examples/definitions/Widgets
    directory.

 3. Place widgets.vpalette and widget_start.vthought into the
    examples/startup/Widgets directory.

 4. Set the Personality preference to "Widgets".

    This can be done by opening the Preferences dialog with the
    Options->Preferences...  menu item, typing "Widgets" in the
    Personality text field in the Startup tab, pressing the Tab key
    (important!), and restarting Visual Thought.

After it is restarted, Visual Thought will first read your shape
definitions out of widgets.vtdef and then read the widgets.vpalette
and widget_start.vthought documents.  The standard basic.vpalette will
_not_ be read.
