Google

CCP4i Documentation for Programmers: Core Documentation

Contents

Utilities for manipulating CCP4i modules.def files (src/modules_utils.tcl)

Some utilities for adding and removing task and module references.

GetModuleList Return a list of the modules in the specified modules def file

Argument list: <modules_file>

This procedure returns a list of modules found in the modules.def file. Each element of the list is itself a list of two elements, the first being the internal name of the module, and the second being the module title as seen by the user. Note that this procedure can read information from either a .def style modules file, or from the old-style flat ascii format modules file.

module_file Full path for the module file to be examined

GetTaskList Return a list of the tasks in the specified module of a modules def file

Argument list: <modules_file> <module_name>

This procedure returns a list with each element representing a task in the specified module. Each element of the list is itself a list of three items, representing the task title (text seen on the task browser buttons), task name (corresponding to the task file), and the task description (text appearing in the task browser message line). Note that this procedure can read information from either a .def style modules file, or from the old-style flat ascii format modules file.

module_file Full path for the module file to be examined

module_name The name or title of the module to be examined

AddModule Add a new module reference to the specified modules def file

Argument list: <modules_file> <module_name> <module_title> <args>

Adds a new module reference to a modules def file, and overwrites with the new version. The new module will be empty when created, and by default is added to the end of the list of modules. Returns 1 on success, 0 on an error (e.g. modules file not found, module name or title already exists).

module_file Full path for the module file to be edited

module_name Name of the new module

module_title Title of the module (text which appears in the list of modules as seen by the user)

-before module_title

Add the new module before the named module, if possible

-after module_title

Add the new module after the named module, if possible

-first

Add as the first module

-last

Add as the last module

UpdateModule Change the module title text

Argument list: <modules_file> <module_name> <new_title>

module_files Full path for the module file to be edited

module_name Name of the module to be updated

new_title Text to be used as new module title

DeleteModule Remove a module reference from the specified modules def file

Argument list: <modules_file> <module_name>

Delete a module from the module def file. This will only work if there are no task references currently in the module.

module_files Full path for the module file to be edited

module_name Name of the module to be removed

AddTaskReference Add a new task reference to the specified modules file

Argument list: <modules_file> <task_title> <task_name> <task_descript> <module_name> <args>

Creates a new task reference in a particular module.

module_file Full path for the modules file to be edited

task_title Title of the task (text which appears in the list of modules as seen by the user)

task_name Name of the task (must correspond to a .tcl file in the tasks directory)

task_descript Description of the task (text which appears in the message line of the main window)

module_name Module to which the task should be added

-before task_title

Add the new task reference before the named task, if possible

-after task_title

Add the new task reference after the named task, if possible

-first

Add as the first task reference in the specified module

-last

Add as the last task reference in the specified module

UpdateTaskReference Update the attributes of a particular task reference

Argument list: <modules_file> <task_title> <module_name> <args>

modules_file Full path for the module file to be edited

task_title Name of the task reference to be updated

module_name Name of the module in which the task reference resides

-title title_text

New title text to replace the existing title

-descript descript_text

New description text to replace the existing description

DeleteTaskReference Remove a task reference from the specified modules def file

Argument list: <modules_file> <task_title> <module_name>

modules_file Full path for the module file to be edited

task_title Name of the task reference to be deleted

module_name Name of the module from which the task is to be removed