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.
Interfaces
IBand
Edge band definition with dimensions and supported material thickness.
Source: SDK/include/pascal/uIBand.pas
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;Published SDK declaration languages: Pascal.
- Property name
- Title
- Type
- WideString
- Description
Human-readable title shown to users.
Declaration
property Title: WideString read GetTitle write SetTitle;Published SDK declaration languages: Pascal.
- Property name
- Width
- Type
- Cardinal
- Description
Width value stored on the object.
Declaration
property Width: Cardinal read GetWidth write SetWidth;Published SDK declaration languages: Pascal.
- Property name
- MaxMaterialThickness
- Type
- Cardinal
- Description
Gets or sets max material thickness.
Declaration
property MaxMaterialThickness: Cardinal read GetMaxMaterialThickness write SetMaxMaterialThickness;Published SDK declaration languages: Pascal.
- Property name
- Thickness
- Type
- Cardinal
- Description
Thickness value stored on the object.
Declaration
property Thickness: Cardinal read GetThickness write SetThickness;Published SDK declaration languages: Pascal.
- Property name
- Surplus
- Type
- Cardinal
- Description
Surplus allowance stored on the object.
Declaration
property Surplus: Cardinal read GetSurplus write SetSurplus;Published SDK declaration languages: Pascal.
- 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).GetPreviewColor/SetPreviewColorare vtable slots appended at the end of the interface, afterEndUpdate, under the same interface GUID, so no existing slot moves; every implementer must add both methods. Engine version 24 carries these slots.Declaration
property PreviewColor: TTcColor read GetPreviewColor write SetPreviewColor;Published SDK declaration languages: Pascal.
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;Published SDK declaration languages: Pascal.
- Property name
- OnIdChange
- Type
- IIdChangeEvent
- Description
Event fired when an identifier changes.
Declaration
property OnIdChange: IIdChangeEvent read GetOnIdChange;Published SDK declaration languages: Pascal.
Methods
- Method name
- Clone()
- Type
- IBand
- Description
Create a copy of the current object.
Declaration
function Clone(): IBand; safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
Parameters
- Method name
- BeginUpdate()
- Type
- procedure
- Description
Start a batched update so change notifications can be delayed.
Declaration
procedure BeginUpdate(); safecall;Published SDK declaration languages: Pascal.
- Method name
- EndUpdate()
- Type
- procedure
- Description
Finish a batched update and allow deferred notifications to resume.
Declaration
procedure EndUpdate(); safecall;Published SDK declaration languages: Pascal.
IBanding
Per-edge band assignment helper used by formats to track left, right, top, and bottom edging.
Source: SDK/include/pascal/uIBanding.pas
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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
- Property name
- OnChange
- Type
- INotifyEvent
- Description
Event fired when the object or collection changes.
Declaration
property OnChange: INotifyEvent read GetOnChange;Published SDK declaration languages: Pascal.
Methods
- Method name
- Assign()
- Type
- procedure
- Description
Copy values from another object of the same type.
Declaration
procedure Assign(const aOther: IBanding); safecall;Published SDK declaration languages: Pascal.
Parameters
IBandList
Ordered helper list used when TonCut loads material-specific band history.
Source: SDK/include/pascal/uIBandList.pas
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;Published SDK declaration languages: Pascal.
ParametersaIndexCardinalZero-based position within a collection.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aBand: IBand); safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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.
Source: SDK/include/pascal/uIBands.pas
Properties
- Property name
- Count
- Type
- Integer
- Description
Number of items currently exposed by the interface.
Declaration
property Count: Integer read GetCount;Published SDK declaration languages: Pascal.
- 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;Published SDK declaration languages: Pascal.
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.
Declaration
property OnAdd: IBandChangeEvent read GetOnAdd;Published SDK declaration languages: Pascal.
- Property name
- OnRemove
- Type
- IBandChangeEvent
- Description
Event fired when an item is removed.
Declaration
property OnRemove: IBandChangeEvent read GetOnRemove;Published SDK declaration languages: Pascal.
Methods
- Method name
- CreateBand()
- Type
- IBand
- Description
Open the Desktop band dialog for a new band. The user can review and update the details before confirming; if the dialog is cancelled, the method returns
null.Declaration
function CreateBand(): IBand; safecall;Published SDK declaration languages: Pascal.
ReturnsThe created band interface instance, ornullif the user cancels the dialog.
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aBand: IBand); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
ParametersaIdInt64TonCut object identifier.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aBand: IBand); safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
ParametersaTitleconstWideStringHuman-readable title.aWidthCardinalWidth value in TonCut units.aThicknessCardinalThickness value in TonCut units.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;Published SDK declaration languages: Pascal.
ParametersaBaseNameconstWideStringBase title used while generating a unique name.aWidthCardinalWidth value in TonCut units.aThicknessCardinalThickness value in TonCut units.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;Published SDK declaration languages: Pascal.
ParametersaTitleconstWideStringHuman-readable title.aWidthCardinalWidth value in TonCut units.aThicknessCardinalThickness value in TonCut units.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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
- Method name
- LoadMaterialBandsFromHistory()
- Type
- IBandList
- Description
Load recently used bands for the selected material.
Declaration
function LoadMaterialBandsFromHistory(aMaterial: IMaterial; aLimit: Integer = 5): IBandList; safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
IBandChangeEventHandler
Callback sink consumed by the matching change-event interface.
Source: SDK/include/pascal/uIBandChangeEvent.pas
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;Published SDK declaration languages: Pascal.
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.
Source: SDK/include/pascal/uIBandChangeEvent.pas
Methods
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aHandler: IBandChangeEventHandler); safecall;Published SDK declaration languages: Pascal.
Parameters
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IBandChangeEventHandler); safecall;Published SDK declaration languages: Pascal.
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;Published SDK declaration languages: Pascal.
ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.