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
- Panel Name:
Enter the panel name. Can enter up to 12 characters for the name. - Undo
Check box selects whether an UNDO button will appear on the panel. - Macro File:
The macro associated with this panel. The macro will be run when the Go button is triggered. - Panel Style:
Can select between pre-SmartCAM v11 format panels - which are 6 lines by 60 characters. Or, and this should be the selection, Configurable Height panels. Configurable Height panels are 80 characters wide and the programmer can select the number of rows. The row options are 2 to 5 lines. - Help ID
Sets the Help Context ID value for context sensitive help. SmartCAM uses the Microsoft HTMLHelp format help files. The Toolbox ID is used when context help is triggered from the SmartCAM Tool Set. The Panel ID is used when help is triggered from the panel itself.
Refer to your HTMLHelp Development Kit documentation for more information on Context IDs. - Help File:
The fully qualified path to the associated HTMLHelp file. - 1 Line Help:
The text string to display in the status bar when holding mouse over the panel.
Dialogs
- Dialog Name:
Enter the name of the dialog. Can use up to 12 characters. - Dialog ID:
Numeric reference ID for the dialog. Used when the dialog is displayed by the macro. - Dialog Size
Height and Width of dialog in characters. - Dialog Position
Start up location of dialog. Use -1 for default location.
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