Copyright © 2008, 2009 Arndt Roger Schneider
Table of Contents
The Runtime Library contains a series of composite windows written in Tcl/Tk. The Runtime Library composite windows are referred to as templates.
Runtime Library Design Principles
Each template shall perform one specific task of its own.
Reuse over reimplementation. The Runtime Library favors aggregation for reuse.
Flexibility through its implementation in Tcl/Tk and generic design.
Predeterministic, keeping the application middle-tier lean. The Graphical User Interface elements are merely transformations from the model-tier. Thus replication code can be removed entirely from the application.
On-demand data acquistion for minimum response times.
Convertible into Scaleable Vector Graphics. All templates can be converted into Scaleable Vector Graphics and thus printed in high quality and converted into Scaleable Vector Graphics based web-applications.
Resolution independence by using vector graphics instead of bitmaps.
Platform independent, thanks to the Tk-Toolkit.
Cross-language support through wrapper classes. Wrapper classes exist for the programming languages : Lisp, Python and Ruby.
All Runtime Library templates can be converted into Scaleable Vector Graphics, thanks to their implementation in Tcl. In some instances gstripes, from the Gestalt Items, is used for the Scaleable Vector Graphics conversion. Please see Gestalt Items, gstripes. The generated Scaleable Vector Graphics can then being edited with conventional vector graphics software and embedded into HTML or PDF.
FOP the FO-Processor, a java® application, converts Scaleable Vector Graphics into PDF or prints it as a vector graphics –resolution independent.
This book contains Scaleable Vector Graphics screen-shots inside the manual pages of: Figure A.3, “rtl_tree”, Figure A.2, “rtl_mlistbox using hugelist” and Figure A.1, “rtl_tabset”.
Runtime Library templates are characterized by the -creator property. The expected value for the creator property is a real window class, which must feature a -class property. This window class gets used to create the composite window via the template.
creator windows
toplevel, creates a floating composite window from the template.
frame, create an embedded composite window from the template.
ttk::frame, creates an embedded, themed composite window from the template
.Composites are also allowed as creators, below is such a composite for a themed floating window:
proc ttk::toplevel { window args } { eval [list ::tk::toplevel $window] $args # use a ttk::frame for themed floating windows. place [frame $w.themed] -bordermode ignore \ -x 0 -y 0 -relwidth 1 -relheight 1 # but return the toplevel! return $window }
How it is used:
rtl_makeFont .fontpicker -creator ttk::toplevel
The Runtime Library contains a simplified way to create new composite windows as explained in the section called “rtl::template”.