Bands
This page covers IBand, IBands, IBandList, IBanding, IBandChangeEvent, and IBandChangeEventHandler. These interfaces define available band materials and the left/right/top/bottom assignments attached to pieces.
IBand.PreviewColor is the color used when the band is drawn in a
preview, as a TTcColor: a $RRGGBB value, clTcNone (no
preview color, the default) or clTcRandom (the host derives a stable color
from the band's Id). GetPreviewColor and SetPreviewColor are vtable
slots appended at the end of the interface, after EndUpdate, under the same
interface GUID, so no existing slot moves; every class that implements
IBand must add both methods. Engine version 24 carries these slots, and
the host refuses a plugin whose EngineVersion does not match.
IBands adds BeginUpdate, EndUpdate, IsUpdating, and
OnChange in engine version 25. BeginUpdate, EndUpdate, IsUpdating, and
GetOnChange are appended after the existing vtable slots under the same interface GUID. See Update scopes
for nesting, notifications, and error handling. Rebuild plugins against the
matching SDK; the Desktop host requires an exact engine version match.
Interfaces
Declarations are shown in Pascal and, where the SDK's generated language-support manifest lists the member for C++, in C++; the build fails if that manifest no longer matches TonCutPluginSdk.hpp. There is no C# declaration: C# plugins are native-shim-only, so a C++ shim owns every interface on this page. Methods are listed with their accessors folded into properties; open Vtable order for the exact slot sequence, and see ABI and marshalling for type sizes and ownership rules.
IBand
Edge band definition with dimensions and supported material thickness.
- IID
- {6377F5CF-5243-4DFB-A3D1-F671022452EA}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIBand
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (20 methods, slots 3 to 22, after the three IUnknown slots)
- function GetId(): Int64;
- procedure SetId(aId: Int64);
- function GetTitle(): WideString;
- procedure SetTitle(const aTitle: WideString);
- function GetWidth(): Cardinal;
- procedure SetWidth(aWidth: Cardinal);
- function GetMaxMaterialThickness(): Cardinal;
- procedure SetMaxMaterialThickness(aMaterialThickness: Cardinal);
- function GetThickness(): Cardinal;
- procedure SetThickness(aThickness: Cardinal);
- function GetSurplus(): Cardinal;
- procedure SetSurplus(aSurplus: Cardinal);
- function GetOnChange(): INotifyEvent;
- function GetOnIdChange(): IIdChangeEvent;
- function Clone(): IBand;
- procedure Assign(const aOther: IBand);
- procedure BeginUpdate();
- procedure EndUpdate();
- function GetPreviewColor(): TTcColor;
- procedure SetPreviewColor(aColor: TTcColor);
Properties
- Property name
- Id
- Type
- Int64
- Description
Persistent numeric identifier used by TonCut to track the object.
Declaration
property Id: Int64 read GetId write SetId;
- Property name
- Title
- Type
- WideString
- Description
Human-readable title shown to users.
Declaration
property Title: WideString read GetTitle write SetTitle;
- Property name
- Width
- Type
- Cardinal
- Description
Width value stored on the object.
Declaration
property Width: Cardinal read GetWidth write SetWidth;
- Property name
- MaxMaterialThickness
- Type
- Cardinal
- Description
Gets or sets max material thickness.
Declaration
property MaxMaterialThickness: Cardinal read GetMaxMaterialThickness write SetMaxMaterialThickness;
- Property name
- Thickness
- Type
- Cardinal
- Description
Thickness value stored on the object.
Declaration
property Thickness: Cardinal read GetThickness write SetThickness;
- Property name
- Surplus
- Type
- Cardinal
- Description
Surplus allowance stored on the object.
Declaration
property Surplus: Cardinal read GetSurplus write SetSurplus;
- Property name
- PreviewColor
- Type
- TTcColor
- Description
Gets or sets the color used when this band is drawn in a preview, as a
TTcColor: a 24-bit RGB value packed as$RRGGBB(not the VCLTColorbyte order),clTcNone(-1, no preview color; the default) orclTcRandom(-2, the host derives a stable color from the item’sId); both constants are defined inuICommonandTonCutPluginSdk.hpp.GetPreviewColor/SetPreviewColorare vtable slots appended at the end of the interface, afterEndUpdate, under the same interface GUID, so no existing slot moves. TonCut implements this interface; a plugin only calls these accessors. Engine version 24 carries these slots.Declaration
property PreviewColor: TTcColor read GetPreviewColor write SetPreviewColor;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
- Property name
- OnIdChange
- Type
- IIdChangeEvent
- Description
Event fired when an identifier changes.
Declaration
property OnIdChange: IIdChangeEvent read GetOnIdChange;
Methods
- Method name
- Clone()
- Type
- IBand
- Description
Create a copy of the current object.
Declaration
function Clone(): IBand; safecall;ReturnsA copied band interface instance.
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IBand); safecall;Parameters
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;
IBanding
Per-edge band assignment helper used by formats to track left, right, top, and bottom edging.
- IID
- {DD657F0E-605D-460B-AD6D-17028C79FDCE}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIBanding
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (10 methods, slots 3 to 12, after the three IUnknown slots)
- function GetNorth(): IBand;
- procedure SetNorth(const aNorth: IBand);
- function GetSouth(): IBand;
- procedure SetSouth(const aSouth: IBand);
- function GetWest(): IBand;
- procedure SetWest(const aWest: IBand);
- function GetEast(): IBand;
- procedure SetEast(const aEast: IBand);
- function GetOnChange(): INotifyEvent;
- procedure Assign(const aOther: IBanding);
Properties
- Property name
- North
- Type
- IBand
- Description
Signed value assigned to the north or top edge; a negative edge-distance value means inherited or unspecified.
Declaration
property North: IBand read GetNorth write SetNorth;
- Property name
- South
- Type
- IBand
- Description
Signed value assigned to the south or bottom edge; a negative edge-distance value means inherited or unspecified.
Declaration
property South: IBand read GetSouth write SetSouth;
- Property name
- West
- Type
- IBand
- Description
Signed value assigned to the west or left edge; a negative edge-distance value means inherited or unspecified.
Declaration
property West: IBand read GetWest write SetWest;
- Property name
- East
- Type
- IBand
- Description
Signed value assigned to the east or right edge; a negative edge-distance value means inherited or unspecified.
Declaration
property East: IBand read GetEast write SetEast;
- Property name
- Top
- Type
- IBand
- Description
Alias of
North; a negative edge-distance value means inherited or unspecified.Declaration
property Top: IBand read GetNorth write SetNorth;
- Property name
- Bottom
- Type
- IBand
- Description
Alias of
South; a negative edge-distance value means inherited or unspecified.Declaration
property Bottom: IBand read GetSouth write SetSouth;
- Property name
- Left
- Type
- IBand
- Description
Alias of
West; a negative edge-distance value means inherited or unspecified.Declaration
property Left: IBand read GetWest write SetWest;
- Property name
- Right
- Type
- IBand
- Description
Alias of
East; a negative edge-distance value means inherited or unspecified.Declaration
property Right: IBand read GetEast write SetEast;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IBanding); safecall;Parameters
IBandList
Ordered helper list used when TonCut loads material-specific band history.
- IID
- {AB6DCA6E-10B5-40A9-AC00-D3C141AC3EB8}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIBandList
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (6 methods, slots 3 to 8, after the three IUnknown slots)
- procedure Add(aBand: IBand);
- procedure DeleteByIndex(aIndex: Cardinal);
- procedure Remove(const aBand: IBand);
- function IndexOf(const aBand: IBand): Integer; overload;
- function GetCount(): Integer;
- function GetByIndex(aIndex: Cardinal): IBand;
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;
- Property name
- Items
- Type
- IBand
- Description
Indexed property used to read one item from the collection.
Declaration
property Items[aIndex: Cardinal]: IBand read GetByIndex; default;Index ParametersaIndexCardinalZero-based position within a collection.ValueThe collection item located at the supplied index.
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aBand: IBand); safecall;Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;ParametersaIndexCardinalZero-based position within a collection.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aBand: IBand); safecall;Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aBand: IBand): Integer; overload; safecall;ParametersReturnsZero-based index of the matching item, or-1when no match exists.
IBands
Collection interface used to create, enumerate, query, and reload a shared Desktop object set.
- IID
- {8011666D-AA9D-4A8B-8B1B-16779133FE1A}
- Parent
- IUnknown (implicit: a Delphi interface without a parent is IUnknown)
- Unit
- uIBands
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (25 methods, slots 3 to 27, after the three IUnknown slots)
- function CreateBand(): IBand;
- procedure Add(aBand: IBand);
- procedure DeleteByIndex(aIndex: Cardinal);
- procedure DeleteById(aId: Int64);
- procedure Remove(const aBand: IBand);
- function IndexOf(const aBand: IBand): Integer; overload;
- function IndexOf(aId: Int64): Integer; overload;
- function FindDuplicate(const aBand: IBand; aCheckTitle: Boolean = False): IBand;
- function FindByTitle(const aTitle: WideString; aWidth, aThickness: Cardinal): IBand;
- function FindUniqueName(const aBaseName: WideString; aWidth, aThickness: Cardinal): WideString;
- function CheckUniqueName(const aTitle: WideString; aWidth, aThickness: Cardinal; const aIgnoreBand: IBand): Boolean; overload;
- function CheckUniqueName(aBand: IBand; aAutoFix: Boolean = False): Boolean; overload;
- function GetCount(): Integer;
- function GetByIndex(aIndex: Cardinal): IBand;
- function GetById(aId: Int64): IBand;
- function GetOnAdd(): IBandChangeEvent;
- function GetOnRemove(): IBandChangeEvent;
- procedure AddMaterialBandToHistory(aMaterial: IMaterial; aBand: IBand);
- function LoadMaterialBandsFromHistory(aMaterial: IMaterial; aLimit: Integer = 5): IBandList;
- function LoadMaterialBands(aMaterial: IMaterial): IBandList;
- procedure Reload();
- procedure BeginUpdate();
- procedure EndUpdate();
- function IsUpdating(): Boolean;
- function GetOnChange(): INotifyEvent;
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;
- Property name
- Items
- Type
- IBand
- Description
Indexed property used to read one item from the collection.
Declaration
property Items[aIndex: Cardinal]: IBand read GetByIndex; default;Index ParametersaIndexCardinalZero-based position within a collection.ValueThe collection item located at the supplied index.
- Property name
- OnAdd
- Type
- IBandChangeEvent
- Description
Event fired when an item is added. Suppressed during a collection update scope; the outermost changed scope emits one collection
OnChangeinstead.Declaration
property OnAdd: IBandChangeEvent read GetOnAdd;
- Property name
- OnRemove
- Type
- IBandChangeEvent
- Description
Event fired when an item is removed. Suppressed during a collection update scope; the outermost changed scope emits one collection
OnChangeinstead.Declaration
property OnRemove: IBandChangeEvent read GetOnRemove;
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Collection notification emitted once when the outermost changed update scope ends (engine version 25). Empty scopes emit nothing. Outside a scope, adds/removes use
OnAdd/OnRemove, and item edits do not emit this collection event. Item events remain active inside collection scopes.Declaration
property OnChange: INotifyEvent read GetOnChange;
Methods
- Method name
- CreateBand()
- Type
- IBand
- Description
Create a new, empty band. No dialog opens, the result is never
null, and the object is not in the collection until you pass it toAdd. A new object has a temporary negativeId.Declaration
function CreateBand(): IBand; safecall;ReturnsA new, empty band that is not yet in the collection; nevernull.
- Method name
- Add()
- Type
- procedure
- Description
Add an object created by this collection’s factory method. In
LoadFile, add to the staging collection you received.Adddoes not check title uniqueness, and adding an object that is already in the collection raises an error.Declaration
procedure Add(aBand: IBand); safecall;Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;ParametersaIndexCardinalZero-based position within a collection.
- Method name
- DeleteById()
- Type
- procedure
- Description
Delete the item with the specified TonCut identifier.
Declaration
procedure DeleteById(aId: Int64); safecall;ParametersaIdInt64TonCut object identifier.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aBand: IBand); safecall;Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aBand: IBand): Integer; overload; safecall;ParametersReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(aId: Int64): Integer; overload; safecall;ParametersaIdInt64TonCut object identifier.ReturnsZero-based index of the matching item, or-1when no match exists.
- Method name
- FindDuplicate()
- Type
- IBand
- Description
Search for an existing item that duplicates the supplied object.
Declaration
function FindDuplicate(const aBand: IBand; aCheckTitle: Boolean = False): IBand; safecall;ParametersaCheckTitleBooleanWhether title collisions should count as duplicates.ReturnsThe matching band interface instance, ornullwhen not found.
- Method name
- FindByTitle()
- Type
- IBand
- Description
Find an item by its title and any additional matching fields.
Declaration
function FindByTitle(const aTitle: WideString; aWidth: Cardinal; aThickness: Cardinal): IBand; safecall;ParametersaTitleconstWideStringHuman-readable title.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.ReturnsThe matching band interface instance, ornullwhen not found.
- Method name
- FindUniqueName()
- Type
- WideString
- Description
Generate or return a title that is unique within the collection.
Declaration
function FindUniqueName(const aBaseName: WideString; aWidth: Cardinal; aThickness: Cardinal): WideString; safecall;ParametersaBaseNameconstWideStringBase title used while generating a unique name.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.ReturnsA title string that is unique within the collection.
- Method name
- CheckUniqueName()
- Type
- Boolean
- Description
Check whether a proposed title is unique within the collection.
Declaration
function CheckUniqueName(const aTitle: WideString; aWidth: Cardinal; aThickness: Cardinal; const aIgnoreBand: IBand): Boolean; overload; safecall;ParametersaTitleconstWideStringHuman-readable title.aWidthCardinalWidth value in hundredths of a millimeter.aThicknessCardinalThickness value in hundredths of a millimeter.ReturnsReturnstrueif the proposed title is unique within the collection.
- Method name
- CheckUniqueName()
- Type
- Boolean
- Description
Check whether a proposed title is unique within the collection.
Declaration
function CheckUniqueName(aBand: IBand; aAutoFix: Boolean = False): Boolean; overload; safecall;ParametersaAutoFixBooleanWhether the method may adjust data automatically.ReturnsReturnstrueif the proposed title is unique within the collection.
- Method name
- GetById()
- Type
- IBand
- Description
Return the item stored under the specified TonCut identifier.
Declaration
function GetById(aId: Int64): IBand; safecall;ParametersaIdInt64TonCut object identifier.ReturnsThe matching band interface instance.
- Method name
- AddMaterialBandToHistory()
- Type
- procedure
- Description
Record a band as recently used for the selected material.
Declaration
procedure AddMaterialBandToHistory(aMaterial: IMaterial; aBand: IBand); safecall;
- Method name
- LoadMaterialBandsFromHistory()
- Type
- IBandList
- Description
Load recently used bands for the selected material.
Declaration
function LoadMaterialBandsFromHistory(aMaterial: IMaterial; aLimit: Integer = 5): IBandList; safecall;ParametersaLimitIntegerValue for limit.ReturnsThe matching band list interface instance.
- Method name
- LoadMaterialBands()
- Type
- IBandList
- Description
Load bands applicable to the selected material.
Declaration
function LoadMaterialBands(aMaterial: IMaterial): IBandList; safecall;ParametersReturnsThe matching band list interface instance.
- Method name
- Reload()
- Type
- procedure
- Description
Reload the underlying data from the host or storage layer.
Declaration
procedure Reload(); safecall;
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Begin a nested collection notification scope (engine version 25). Balance each call with
EndUpdateinfinally. Changes take effect immediately; the scope provides no rollback.Declaration
procedure BeginUpdate(); safecall;
- Method name
- EndUpdate()
- Type
- procedure
- Description
End one collection notification scope (engine version 25). The outermost call emits one collection
OnChangeonly if an add, remove, or itemOnChangeoccurred in the scope; suppressed add/remove callbacks are not replayed. Raises an error without a matchingBeginUpdate.Declaration
procedure EndUpdate(); safecall;
- Method name
- IsUpdating()
- Type
- Boolean
- Description
Report whether at least one collection notification scope remains open (engine version 25). Nested scopes remain active until the outermost
EndUpdate.Declaration
function IsUpdating(): Boolean; safecall;ReturnsReturnstruewhile the interface is inside aBeginUpdate/EndUpdatebatch.
IBandChangeEventHandler
Callback sink consumed by the matching change-event interface.
- IID
- {2064046C-FDD8-4759-B456-C29A3F4BB0EC}
- Parent
- IUnknown
- Unit
- uIBandChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (1 methods, slots 3 to 3, after the three IUnknown slots)
- procedure Invoke(aSender: IUnknown; aBand: IBand; aIndex: Integer);
Methods
- Method name
- Invoke()
- Type
- procedure
- Description
Handle the event callback when the owning event interface invokes it.
Declaration
procedure Invoke(aSender: IUnknown; aBand: IBand; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerZero-based position within a collection.
IBandChangeEvent
Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.
- IID
- {329C87ED-017A-47F2-9304-80EC3E9DDEF7}
- Parent
- IUnknown
- Unit
- uIBandChangeEvent
The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.
Vtable order (3 methods, slots 3 to 5, after the three IUnknown slots)
- procedure Add(aHandler: IBandChangeEventHandler);
- procedure Remove(aHandler: IBandChangeEventHandler);
- procedure Invoke(aSender: IUnknown; aBand: IBand; aIndex: Integer);
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aHandler: IBandChangeEventHandler); safecall;Parameters
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IBandChangeEventHandler); safecall;Parameters
- Method name
- Invoke()
- Type
- procedure
- Description
Raise the typed change event for the current payload.
Declaration
procedure Invoke(aSender: IUnknown; aBand: IBand; aIndex: Integer); safecall;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.