|
ClassyTk Builder
|
Home
Documentation
Screenshots
Binary distributions
Source distribution
The ClassyTk Builder can be used to graphically create interfaces. It
is invoked via the cbuild command in the bin ClassyTk directory.
Creating an application
You can either invoke cbuild with the name of the application you want to create,
or start cbuild without parameters. If you don't give parameters to cbuild, a
file selection dialog will be presented where you can select or type in the
application name. If no file with this name exists, an application of that
name will be created. An editing session will be started automatically.
Application structure
The application consists of a directory with the given name. This directory
contains one executable script with the same name, that is used to start up
the application. It also contains the directories lib, conf and help, that
contain code, configuration information and help files respectively.
You may not move the executable out of the application directory, as it
uses its location to find its resources; However, links to this executable
will correctly start the application.
The lib directory has two subdirectories named interface and code. The interface
subdirectory contains the code for all interface objects created by the builder.
The code dir contains all other code. Initially the directory code contains one file
with one function named "main". The function main is called by the startup script,
and should always be present for the application to work. In this function, you can put
all code to initialise the application. In a new app, it will only create a mainw interface
object (in the interface directory) named .mainw.
Editing an application
An editing session on an application can be started in several ways:
You can either invoke cbuild with the name of the application to be edited,
invoke cbuild without parameters, and select the application to be edited in a file
selection dialog, or run the application with "-builder" as the first parameter.
The builder works within the program to be edited. This means that you can do
realistic testing. So when invoking the builder on an appliction, the application
will start up normally, but will show one window extra: the builder window.
The builder window
By default, the builder window shows the files in the code directory of
the application. Clicking on such a file will show (or hide), the functions
in this file. Double clicking on a plain function will start the function
editor on this function. Double cliking a file will start a text editor on
the entire file.
Besides the plain Tcl functions, there are special interface functions. These
functions are used to create interface objects such as dialogs, toplevels and
frames. The functions are diplayed with a different icon in builder window,
and are edited graphically with the window
builder (also started by double clicking). invoking an interface
function without parameters will create a window with its default window
name. An interface function can be used to create several (similar) windows,
by invoking it several times with different window names as a parameter.
You can also create interface functions that can have extra parameters in the
form of an "option value ..." list.
In the builder you can also remove, add, copy, paste or rename files and functions.
You can also browse and edit the configuration and help directories (from
the File menu). The configuration dir contains several subdirectories. The init
subdir contains the default application configuration files. The data in
them will be edited with configuration dialogs
Configuration settings
In the configuration system, settings for different
types of configuration are handled the following way:
The color, font and Misc settings are changed in the options database. You can
see the actual option Pattern by opening the "Advanced" fold. The buttons and
entries in this fold can also be used to add, change or delete options.
The key and mouse configuration settings are changed by defining (or redefining)
virtual events. These virtual events can be used directly by bindings in your
application, or automatically via the DynaMenu
system. Toolbars and Menu configurations provide the definitions for
DynaTool and
DynaMenu.