InterViews Glyph objects provide the usual user interface widgets like buttons, scrollbars, pulldown menus, string editors, etc. (They also provide a limited graphical capability; since they don't have a general editing framework the glyph graphics are mostly useful for static pictures, e.g. a graphic inside a button.) We use glyphs to implement layout, look-and-feel, and controls/displays for application programs.
The main technical advantages of glyphs are:
The ultimate reference for glyphs is the "InterViews Reference Manual Version 3.1" (no frames) dated December 14, 1992. It is included in the InterViews source tree under iv/src/man/refman/refman.PS. Here we will provide supplementary information and more practical hints.
Some of the more important glyph classes are:
Glyph:
base class for all glyph objects MonoGlyph:
wrapper to override some aspect of a glyph PolyGlyph:
wrapper for list of glyphs InputHandler:
glyph that receives input (mouse or keys) Action:
object to provide callback functions for input
handling glyphs (used by buttons, menus, etc.)Style:
keep track of X resources, command line flags and
programmer-defined parameters with default valuesObservable/Observer:
provide automatic update of
displays when a data value changesWindow, Display:
X Window basic objectsWidgetKit:
object factory to create common user interface
objects with a concrete look-and-feel (beveled frames, menus,
buttons, scrollers)LayoutKit:
object factory to create objects that
manage the physical layout of one or more glyphs (boxes and glue)
DialogKit:
object factory for dialoglike objects.
Field editors and file choosers.
The basic glyph demo program is idemo, included in the InterViews source tree under iv/src/bin/idemo/. It features pulldown menus, text labels (normal and rotated), push buttons, check boxes, radio buttons, palette buttons, field (text) editors, scrollbars and a panner. By using the flags -openlook, -motif or -sgimotif at program startup you can see the same glyphs under each different look-and-feel discipline.
We also have a few other glyph-based derived classes and example programs in the ivtools package. These are examples of glyph usage and/or subclasses that extend the basic glyph functionality in some way. Most of these are contained in the IVGlyph library within ivtools.
BoundedValue
is a constrained float value.
BoundedValueObserver
is a simple textual display of the value.
MeterObserver
is a scrolling display of the value.
BoundedValueEditor
is an editor for a value using textual input
or a movable scrollbarObservableBoolean
is a true/false value. BooleanObserver
is a simple textual display of the value. CheckBooleanEditor
and PaletteBooleanEditor
modify the value via checkbox or
palette buttonObservableEnum
is an enumerated value. EnumObserver
is its
simple textual display. MenuEnumEditor
, RadioEnumEditor
and CycleEnumEditor
modify the enumerated value via menus,
radio buttons or previous/next buttonsObservableText
, TextObserver
, ObsTextEditor
CharFieldEditor
: field editor that calls update on every keystroke
GFieldEditor
: a purely Glyph
field editor without Interactors
(hence can be scrolled within another glyph.)
OpenFileChooser
: a file chooser more suited for derivation.
Subclasses are ImportChooser
, PrintChooser
, ExportChooser, and SaveAsChooserStrChooser
: dialog for choosing one from a list of stringsEivTextEditor
: contributed glyph for editing largish quantities
of text within an applicationScrollable
: a glyph that can scroll other glyphs within its
bodyFig31
: graphic-like figure glyphs. Fig31Line
, Fig31Rectangle
, Fig31Circle
,
Fig31Ellipse
, Fig31Open_BSpline
, Fig31Closed_BSpline
, Fig31Polygon
. These were designed
to mimic the basic Unidraw graphic objects, but there are no
tools for drawing them; they are usually created programatically.
Glyphs are compiled with different options and namespace than Unidraw objects. See the different rules used in the Imakefiles. This can lead to conflicts but we have developed ways of integrating glyphs with Unidraw that work in our examples.
The layout model for glyphs is based on the TeX boxes and glue model. ...
back to ivtools technical info