Programmer Guide/Macro Library/CTemplates: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
{{TOC limit|3}} | |||
==CASegTemplate : CObj== | ==CASegTemplate : CObj== | ||
Revision as of 08:25, 19 June 2017
CASegTemplate : CObj
A class to manage segment templates (ASegTemplate
).
You can retrieve a list of templates available in the STx INI file. You can display a dialog offering the user the option of importing from or exporting templates to disk. You can delete templates from the STx INI file.
CASegTemplate construction
The CASegTemplate
constructor takes no parameters but still needs to be called.
CASegTemplate Member Functions
The CASegTemplate
class has the following member functions. See CObj Member Functions for a list of functions implemented in the parent class.
List
List the available templates in either a table or a semi-colon separated list.
Usage:
inst List [ rType ]
Parameters:
- rType
- The type of list to return. Possible values are:
table
- Return a simple table.
list
- Return a semi-colon separated list.
Result:
Depending on rType, a table or a list containing the ids of the segment templates in the current STx INI file.
Reload
Reload the list of templates from the STx INI file.
Usage:
inst Reload
Result:
An empty string.
Manage
Show user a dialog asking user to select segment templates to import, export, delete or reload from file.
Usage:
inst Manage
Result:
An empty string.
Import
Import a segment template from disk into the STx INI file. If no template path is specified, the user is asked to select one from disk.
Usage:
inst Import [ path ] [ ; confirmReplace=1 ]
Parameters:
- path
- The path to the segment template to import. If this parameter is not specified, the user is asked to select a template from disk.
- confirmReplace
1
if the user should be prompted when replacing existing templates.0
otherwise. The default is1
.
Result:
The id of the valid segment template or an empty string
Export
Export an existing ASegTemplate to disk.
Usage:
inst Export asegtemplate
- asegtemplate
- The id of a segment template currently in the STx INI file.
Result:
An empty string.
Remove
Remove an existing segment template from the current STx INI file.
Usage:
inst Remove asegtemplate
- asegtemplate
- The id of a segment template currently in the STx INI file.
Result:
An empty string.
ReloadFromFile
Reload an existing segment template from file.
Usage:
inst Reload asegtemplate
- asegtemplate
- The id of a segment template currently in the STx INI file.
Result:
An empty string.
ViewTemplate
Display a dialog based on a segment template.
Usage:
inst ViewTemplate asegtemplate
Parameters:
- asegtemplate
- The id of a segment template currently in the STx INI file.