Google

CCP4 web logo CCP4i: Graphical User Interface
Documentation for Programmers
CreateExtendingFrame

next button previous button top button

NAME

CreateExtendingFrame - create an extending frame - a mini table

SYNOPSIS

CreateExtendingFrame counterVar procedure_name message_text add_button_text parameter_list

Optional Arguments:

-edit edit_procedure_name
-noaddline
-dependentframe dependent_procedure_name
-counter parent_counterVar
-child child_procedure_name

DESCRIPTION

An extending frame is a mini table which is made up of a variable number of identical rows. In principle it could be made up of multiple copies of a set of two or more rows but this does not make for a very clear interface and would be better handled by the CreateToggleFrame command.

The frame will be drawn with two buttons at the bottom - the 'add' button will just add an extra row to the table. The other, 'edit', button has other simple editing functions. The description of the row(s) to draw are in a separate procedure called procedure_name which must have been defined in the taskname.tcl file before the taskname_task_window procedure.

The other arguments to the CreateExtendingFrame command are:

counterVar
the name of the variable which acts as a counter for the number of rows currently drawn
message_text
the text to appear in the message line when the cursor is over the 'add' button
add_button_text
the text to appear in the 'add' button
parameter_list
is a list of the parameters which are used in the procedure
procedure_name

Optional arguments:

-edit edit_procedure_name
The procedure edit_procedure_name is the name of a procedure which must have been defined in the taskname.tcl. This procedure will be called whenever the user uses the 'edit' button after the edit has been performed. This procedure may be needed to reset anything which is dependent on the contents of the extending frame.

The following optional arguments are only applicable if you have a dependent frame.

-noaddline
-dependentframe dependent_procedure_name

The dependent procedure should be defined eleswhere in the task file with the following syntax:

proc dependent_procedure_name arrayname counter {
...
}

The arguments arrayname (name of the array storing information for the current task window) and counter (number of the dependent frame being drawn) are passed to the dependent frame procedure when it is called inside the interface.

The following optional arguments are only applicable if you have more complex 'parent and child' extending or toggle frames.

-counter parent_counterVar
-child child_procedure_name

HINTS

There are a couple of examples of extendinging frames in the interface to Scaleit - in the file section at the top of the window there is an extending frame to select variable numbers of derivatives and in the Exclude Reflections folder there is an extending frame to define exclusions. The code to do this is in the file $CCP4I_top/tasks/scaleit.tcl. Look for the procedure names ScaleitDerivs and ScaleitExclude.

KEYWORDS