Visual CTK Overview

Visual CTK is a user interface design tool. By pulling user interface tokens from a token palette and dropping them on the custom panel or dialog representation, a user interface can be designed.

Note: Visual CTK is a separate download and installation. The utility will need to be downloaded from the SmartCAMcnc website and installed separately. It is available on the normal download page.

Panels or Dialogs

PCB files, the binary files that contain the custom panel or dialog descriptions, can be either panel or dialog files. While you can have multiple panels in a panel PCB or multiple dialog boxes in a dialog PCB; you cannot mix and match panels and dialogs in the same file.

When you create a new PCB file, you will be prompted to choose whether it will be for panels or dialog boxes.

Saved Files

Visual CTK can save binary PCB files and ASCII text PCS files. The PCS files are an ASCII text representation of the custom panel or dialog. The binary PCB file format must be used when integrating the custom UI with SmartCAM.

Creating a PCB

The following general steps are used to create a PCB file. In this example, a simple single panel PCB file will be created. This is just an example of how the utility is used, not an attempt to make a useful panel.

Start a new PCB

Use File - New and then when prompted, pick whether the PCB will contain panel or dialog definitions. Alternatively, can use the new Panel and new Dialog icons on the application toolbar.

Creates a new Panel PCB file.
Creates a new Dialog PCB file.

Create a new Panel or Dialog

The PCB Resources dialog is opened. From this dialog, the programmer can create a new panel or dialog definition, open and edit an existing definition, or delete a definition.

Click the New button to create a new definition.

Enter Properties

The Properties dialog opens. The following properties are available:

Panels

Dialogs

Add Tokens

Once the Properties are entered, a representation of the panel or dialog is displayed. All available PCB UI components are displayed on the Token Palette.

Click on the needed token type, in the Palette, and then click on the Panel or Dialog representation to place the component.

A Token Properties dialog will open. The contents of the Properties dialog vary from token to token. The Token Properties dialog will contain inputs for information needed to create the user interface component. For example if you place a Text Label, it will prompt for the Label's display text. If the token is a XY Coordinate input, the Token Properties will have fields for entering the component's text label and the variables required to store the X and Y coordinate locations.

The programmer would add all the required tokens of the correct types.

Clean Up

On the far left end of the Token Palette is a Pointer icon. Pick this and then click and drag a token on the panel or dialog representation. It will drag and drop the token to a new location. This can be used to do final token positioning and fine tuning.

Resource - Set Tab Order is used to set the tab order for the UI components on the custom panel or dialog.

Save

Use File - Save and File - Save As to save the PCB file. Save in PCS format for a ASCII text representation. Save in PCB format for a binary format. The PCB files can be used by SmartCAM, the PCS format files cannot.

These are the main steps used when creating a custom UI for SmartCAM macros. Refer to the Visual CTK's online help for more detailed information about the utility. As well as information on design features not covered above.

Related Topics

Dialog Boxes

Creating a User Interface Overview

SmartCAM Automation Overview