Generated from scriptingAtomicLabels.tcl with ROBODoc v3.2.4 on Wed May 25 16:04:51 2005
NAME
scripting::atomicLabels
PURPOSE
This namespace provide the scripting interface for editing
atomic-labels (fonts, font-colors, label-texts). There are two
levels of atomic-labels, so-called, global and custom. The global
labels are kind of default labels with the text of atomic-symbols.
The global labels are all those atomic-labels, that were not yet
explicitly edited on per-atom basis. The custom labels are those
that were edited on per-atom basis.
Atomic labels have two different font colors, so-called,
bright-color and dark-color. The bright font color is used for all
Lighting-On display modes, and for WireFrame-like Lighting Off
display modes. On the other hand the dark-color is used for
Lighting-Off BallStick and SpaceFill display modes.
COMMANDS
-- scripting::atomicLabels::global
Edits the fonts and font-colors of global atomic labels.
--scripting::atomicLabels::atomID
Edits the fonts, font-colors of custom atomic label on per-atom basis.
-- scripting::atomicLabels::atomType
Edits the fonts, font-colors of custom atomic label on per-atom type basis.
-- scripting::atomicLabels::render
Toggles the display of global or custom atomic labels
-- scripting::atomicLabels::clear
Clears the custom label according to specified mode, which is either
all, atomID, or atomType.
SOURCE
namespace eval scripting::atomicLabels {
variable atomicLabels
# --------------------------------------------------
# atomicLabels array-variable has these elements
# --------------------------------------------------
#
# atomicLabels(global.font)
# atomicLabels(global.brightcolor)
# atomicLabels(global.darkcolor)
#
# atomicLabels(custom.label)
# atomicLabels(custom.font)
# atomicLabels(custom.brightcolor)
# atomicLabels(custom.darkcolor)
#
# --------------------------------------------------
# in addition it also contains the following elements:
# --------------------------------------------------
#
# atomicLabels(atomID.*)
#
# where "*" resperesnt the same elements as for custom.*
}
NAME
scripting::atomicLabels::global
USAGE
scripting::atomicLabels::global \
-xfont font \
-tkfont tkfontname \
-brightcolor rgb \
-darkcolor rgb
PURPOSE
This proc edits the fonts (i.e. font-type and size) and font-colors
of global atomic labels. One can specify either XLFD font name, i.e.,
those that look as: -*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-*, or
Tk font name. The Tk font names are those created by the "font create ..."
Tk command.
ARGUMENTS
args -- various configuration "-option value" pairs (see Options)
OPTIONS
------------------------------------------------------------------------
OPTION ALLOWED-VALUES + DESCRIPTION
------------------------------------------------------------------------
-xfont xfontname --> X11's XLFD font name
-tkfont tkfontname --> Tk font name, previously create by the
"font create ..." Tk command. If both -xfont
and -tkfont options are specified the value
of -tkfont option is taken/
-brightcolor rgb --> the red-green-blue specification of bright
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
-darkcolor rgb --> the red-green-blue specification of dark
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
------------------------------------------------------------------------
RETURN VALUE
Undefined.
EXAMPLE
scripting::atomicLabels::global \
-xfont -*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-* \
-brightcolor #ffffff \
-darkcolor #000000
NAME
scripting::atomicLabels::atomID
USAGE
scripting::atomicLabels::atomID atomID \
-label string \
-xfont xfont \
-tkfont tkfontname \
-brightcolor rgb \
-darkcolor rgb
PURPOSE
This proc edits a custom atomic label on per-atom (i.e. atomID)
basis. It is possible to edit the label-text, font (i.e. font-type
and size) and font-colors. One can specify either XLFD font name,
i.e., those that look as:
-*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-*, or Tk font name.
The Tk font names are those created by the "font create ..." Tk
command.
ARGUMENTS
atomID -- the ID (i.e. sequential number) of an atom
args -- various configuration "-option value" pairs (see Options)
OPTIONS
------------------------------------------------------------------------
OPTION ALLOWED-VALUES + DESCRIPTION
------------------------------------------------------------------------
-label string --> the label-text
-xfont xfontname --> X11's XLFD font name
-tkfont tkfontname --> Tk font name, previously create by the
"font create ..." Tk command. If both -xfont
and -tkfont options are specified the value
of -tkfont option is taken/
-brightcolor rgb --> the red-green-blue specification of bright
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
-darkcolor rgb --> the red-green-blue specification of dark
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
------------------------------------------------------------------------
RETURN VALUE
Undefined.
EXAMPLE
scripting::atomicLabels::atomID 10 \
-label "Fe(spin up)"
-xfont -*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-* \
-brightcolor #ffffff \
-darkcolor #000000
NAME
scripting::atomicLabels::atomType
USAGE
scripting::atomicLabels::atomType atomType \
-label string \
-xfont xfont \
-tkfont tkfontname \
-brightcolor rgb \
-darkcolor rgb
PURPOSE
This proc edits a custom atomic labels on per-atom-type
(i.e. atomType) basis. It is possible to edit the label-texts, font
(i.e. font-type and size) and font-colors. One can specify either
XLFD font name, i.e., those that look as:
-*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-*, or Tk font name.
The Tk font names are those created by the "font create ..." Tk
command.
ARGUMENTS
atomType -- atomic-number or atomic-symbol
args -- various configuration "-option value" pairs (see Options)
OPTIONS
------------------------------------------------------------------------
OPTION ALLOWED-VALUES + DESCRIPTION
------------------------------------------------------------------------
-label string --> the label-text
-xfont xfontname --> X11's XLFD font name
-tkfont tkfontname --> Tk font name, previously create by the
"font create ..." Tk command. If both -xfont
and -tkfont options are specified the value
of -tkfont option is taken/
-brightcolor rgb --> the red-green-blue specification of bright
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
-darkcolor rgb --> the red-green-blue specification of dark
font-color color (see scripting::atomicLabels
for the description) of bright and dark font
colors). Color can be specified either in
hexadecimal forms (i.e. #rrggbb) or as a list
of three floats in range [0,1] (i.e.
{0.5 0.5 0.5}).
------------------------------------------------------------------------
RETURN VALUE
Undefined.
EXAMPLE
scripting::atomicLabels::atomType Zn \
-label "Fe(spin up)"
-xfont -*-itc bookman-demi-r-normal-*-13-*-*-*-*-*-*-* \
-brightcolor #ffffff \
-darkcolor #000000
NAME
scripting::atomicLabels::render
USAGE
scripting::atomicLabels::render global on|off
or
scripting::atomicLabels::render custom on|off
or
scripting::atomicLabels::render atomID id on|off
or
scripting::atomicLabels::render atomType type on|off
SYNOPSIS
scripting::atomicLabels::render labelType args
PURPOSE
This proc toggles the display of global or custom atomic labels.
scripting::atomicLabels::render global -- toggles the display of all
global atomic labels
scripting::atomicLabels::render custom -- toggles the display of all
custom atomic labels.
scripting::atomicLabels::render atomID id -- toggles the display of
a particular atomic-label (i.e. that of id-th atom). The argument
"id" is the an atomic id, i.e., sequential number.
scripting::atomicLabels::render atomType type -- toggles the display
of all labels of a give atomic-type. The argument "type" is either
atomic symbol or atomic number.
ARGUMENTS
labelType -- must be one of globa, custom, atomID or atomType
args -- the rest of the arguments (depends on the labelType)
RETURN VALUE
Undefined.
EXAMPLE
scripting::atomicLabels::render atomType Mg off
NAME
scripting::atomicLabels::clear
USAGE
scripting::atomicLabels::clear all
or
scripting::atomicLabels::clear atomID id
or
scripting::atomicLabels::clear atomType type
SYNOPSIS
scripting::atomicLabels::clear mode args
PURPOSE
This proc clears the custom label according to specified mode, which
is either all, atomID, or atomType.
scripting::atomicLabels::clear all -- clears all custom labels,
meaning that all labels become global-labels
scripting::atomicLabels::clear atomID id -- clears the custom label
of id-th atom. Its label become the global label
scripting::atomicLabels::clear atomType type -- clears all custom
labels of a given atomic type. These labels become global labels.
ARGUMENTS
mode -- must be one of all, atomID, or atomType
args -- either atom-ID or atom-Type for atomID or atomType, respectively
RETURN VALUE
Undefined.
EXAMPLE
scripting::atomicLabels::clear atomType Mg
NAME
scripting::atomicLabels::_parseOptions
USAGE
scripting::atomicLabels::_parseOptions ?-options value? ...
PURPOSE
This proc is to parse the options of scripting::atomicLabels::****
class of commands. For internal use only.
ARGUMENTS
args -- the "-option value" pairs
RETURN VALUE
Undefined.