ExportTypeExtension Class |
Namespace: CTExtensions.Interfaces
The ExportTypeExtension type exposes the following members.
Name | Description | |
---|---|---|
CreateExportProfileSettingsControl |
Override majority of the settings page with your custom control.
| |
Dispose |
Called when the settings page is closed.
You may dispose everything.
| |
ExtraButtonClicked |
Called when user clicks the [...] button next to profile type combo.
The button is available for clicking only if GetSettingsViewOpts
returns CTEngineLib.ctExportSettingsViewOpt.ctExportSettingsViewOptNone in its
bitmask.
| |
FieldChanging |
Notification that user is about to edit given field.
| |
FieldDeleting |
Notification that user is about too delete given field.
| |
GetParent |
Must implement. Return parent CTExtension of this export extension.
| |
GetSettingsViewOpts |
Return arbitrary option flags for the settings page.
See ctExportSettingsViewOpt for possible flags.
| |
Init |
Called when this extension is selected from the export type combo
for the first time. Immediately after this TypeSelected
is also called.
| |
ProfileOptionsComboString |
Name that is shown in profile type combo.
By default this is parents FriendlyName.
| |
Save |
Called when user clicks OK at export profile settings.
| |
TypeDiscarded |
Called when user had this export type selected, but
then selected some other type. Return true to
prevent user from changing to another type. This is mainly
meant fot extensions to
| |
TypeSelected |
Notification that this type was just selected from
profile type combo. If the selection happens for the first
time during the setting dialogs lifetime, this call is
preceeded with Init(CTExportProfile).
|
// @AUTO-REFERENCE { [CT_INSTALL_PATH]\CTInterface.dll } // @AUTO-REFERENCE { [CT_INSTALL_PATH]\Interop.CTEngineLib.dll } using ATR.CT.CTInterface; using CTExtensions; using CTEngineLib; using CTExtensions.Interfaces; public class MyAddin : CTExtension { private MyExportExtension moExpExt; public override bool Hook(CTInterface oCTInterface) { bool bHooked = false; if (oCTInterface != null) { // Hook to CTInterface events and set bHooked = true. // Since this extension returns customized ExportTypeExtension, // this implementation will consume all events during export procedure // if the export profile has this extension set as profile type. } return bHooked; } public override void UnHook(CTInterface oCTInterface) { if (oCTInterface != null) { // Un-Hook all handlers from CTInterface } } /// <summary> /// Return the custom interface on request. /// </summary> public override IExtensionInterface GetInterface(ctExtensionInterface eType) { if (eType == ctExtensionInterface.ctExtensionInterfaceIExportType) { if (moExpExt == null) moExpExt = new MyExportExtension(this); return moExpExt; } return null; } /// <summary> /// Create custom implementation for ExportTypeExtension. /// Minimal implementation needs only to return parent extension. /// </summary> class MyExportExtension : ExportTypeExtension { private MyAddin moParent; public MyExportExtension(MyAddin oParent) { moParent = oParent; } public override ICTExtension GetParent() { return moParent; } } }
CUSTOMTOOLS 2017 SP1