Chapter 9. Tcl/Tk Parser

Table of Contents

Introduction
dump-geometry-canvas
isItemInvisible
createOptions-image
save-elisp
isSkippedFor
isIgnored
dump-composed
dump-configure-Rtl_mlistbox
initActions
isKey
useResourceFile
dump-configure
getTarget
dump-configure-TixLabelFrame
insertClassDef
walkDownZincGroups
clearBuffers
dump-geometry-notebook
dump-gchild
isAlwaysWhile
dump-configure-Hugelist
dump-hugelist-items
save-docbookAPI
countWidgets
save-widget
makeAddendum
appendActions
dump-children-NoteBook
cleanseTags
prerequisite
dump-configure-PathCanvas
setMapOption
dump-geometry-panedwindow
reverse
getValidProc
substitutep
dump-configure-Rtl_tabset
isDefault
lineargradient
storeStyles
setIndexedArrayMap
testAddendum
isPart
clearOptions
baseName
save-lisp
isComposed
dump-configure-Zinc
infoproc
dump-configure-TixNoteBook
dump-configure-Galette
dump-configure-Goolbar
style
tixpage
remMap
isAssigned
remAllMap
isSkipped
resolve-chars
initPrerequisite
dump-configure-Menu
getMapOption
save-xcode
storeFonts
isSkippedZinc
validHelp
dump-geometry-text
dump-geometry-grid
dump-configure-Table
dump-children
useMsgCat
getArrayMap
save-docbook
dump-configure-Tablelist
getIndexedArrayMap
save-ruby
dump-configure-TixPanedWindow
dump-configure-Listbox
dump-widget
dump-template
dump-geometry-zincwindow
initStyles
isHugelistSkipped
isMessage
getGroupID
useSimpleCode
dump-configure-Rtl_tree
createOptions-tile
mkSources
resolveFileProperty
procname
save-python
storeActions
dump-tag
dump-hugelist-Rtl_mlistbox
newMap
dump-bindings
isInvisible
setArrayMap
getInterface
storeLineargradients
dump-configure-Gistbox
initWidgets
validHref
searchVar
storePrerequisite
quoting

General Code creation module. The code generation was originally based on a prototype concept. Starting with version 3.0 (Jeszra 0.1) the code generation no longer uses prototypes from the prototype directory. The code blocks deployed inside the generated code are moved --if not already prototyped-- to the dumper files. For new languages only the appropriated dumper have to be defined. The parsing code -- inside of this module-- remains the same for all languages. However theneed may arise to let other languages partially control the parsing. This might require Tcl wrappers for composites, such as rtl_gridwin or gistbox.

Images and Icons: Goal is it to embed all images in source code.

Two approaches are used for this: • Using the base64 package. • Using Img with the data command.

Base64 does not always produce proper base64 encoded images–whatever the reason is. It works so far for ordinary .gif images, painless so to say. For Img based images it fails completely. For that reason base64 is only used for gif and if tkpng is available for PNG images, too.

When Img is present, then all images are encoded through Img, which makes it necessary that Img is loaded before any image is created. The Img base64 part works properly and is the recommended variant for SVG code generation.

09/27/05 -- Added Code for panedwindow geometry manager. For the interactive part see vgutils.tcl. -- Fixed Code generation for Text widget -- Added listbox content -- Added rtl_listbox content -- Added gistbox content

01/06/07 -- Added Code for tkpath (path) lineargradients storeLineargradients, initLineargradients, lineargradient

01/10/07 -- Added Code generation for Zinc isSkipped, isInvisible, cleanseTags, dump-configure-zinc groupOf, initZincGroups, dump-geometry-zinc 03/17/07 -- Added Code generation for tile notebook manager.

03/20-04/04/07 First general refactoring for multi language support Initial planned languages: Ruby, Perl, Python, Lisp (ltk & sbcl) TclTk (vanilla, procedure, template) + X11 Resources, XAML, Erlang, ADA, XUIL

04/15/2007 Main Revision completed. Open points special code generation Tix, Tile, Blt, Rtl, gestalt-items & fonts, images. + Image code generation has to be extended for using BASE64 encoded images. + Package storage as known within palettes.

Test included: Zinc, Canvas, TkPath, Text tag, bindings, groups, clipping, gradients, menu forced entries, managers (zinc, canvas, text, pack) vanilla & template code, Message Catalog. 07/31/2007, Deleted vgppro Revision : 08/01/2008, Roger Introduce tkpath 0.3 as PathCanvas, and correct parameter mismatch inside lineargradient. Froze "-Canvas". Which features also »styles«.

New functionality added: »prerequisite«. A prerequisite is induced by the code generation in order to handle conditions, which have to be meet before any instance of a given template can be created. These conditions are not the usual »package require«’s such as for the rtl. but instead specific for the different classes.

WARNING: NOT ALL PACKAGES ARE HANDLED THROUGH prerequisite RIGHT NOW.

Requires changes inside the GUI. A new item for such conditions.

New Feature in regard to prerequisite rtl_tree content can be generated, too. So the used way is a full-dump of the tree's own array. Version 3.2 Revision : 01/27/2010, Roger-eval Revision : 03/23/2010, Roger-DocBook API documentation