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.

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)
  1. function GetId(): Int64;
  2. procedure SetId(aId: Int64);
  3. function GetTitle(): WideString;
  4. procedure SetTitle(const aTitle: WideString);
  5. function GetWidth(): Cardinal;
  6. procedure SetWidth(aWidth: Cardinal);
  7. function GetMaxMaterialThickness(): Cardinal;
  8. procedure SetMaxMaterialThickness(aMaterialThickness: Cardinal);
  9. function GetThickness(): Cardinal;
  10. procedure SetThickness(aThickness: Cardinal);
  11. function GetSurplus(): Cardinal;
  12. procedure SetSurplus(aSurplus: Cardinal);
  13. function GetOnChange(): INotifyEvent;
  14. function GetOnIdChange(): IIdChangeEvent;
  15. function Clone(): IBand;
  16. procedure Assign(const aOther: IBand);
  17. procedure BeginUpdate();
  18. procedure EndUpdate();
  19. function GetPreviewColor(): TTcColor;
  20. 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 VCL TColor byte order), clTcNone (-1, no preview color; the default) or clTcRandom (-2, the host derives a stable color from the item’s Id); both constants are defined in uICommon and TonCutPluginSdk.hpp. GetPreviewColor/SetPreviewColor are vtable slots appended at the end of the interface, after EndUpdate, 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;
    Returns
    A 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
    aOtherconst
    Source object whose values should be copied.
  • 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)
  1. function GetNorth(): IBand;
  2. procedure SetNorth(const aNorth: IBand);
  3. function GetSouth(): IBand;
  4. procedure SetSouth(const aSouth: IBand);
  5. function GetWest(): IBand;
  6. procedure SetWest(const aWest: IBand);
  7. function GetEast(): IBand;
  8. procedure SetEast(const aEast: IBand);
  9. function GetOnChange(): INotifyEvent;
  10. 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
    aOtherconst
    Source object whose values should be copied.

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)
  1. procedure Add(aBand: IBand);
  2. procedure DeleteByIndex(aIndex: Cardinal);
  3. procedure Remove(const aBand: IBand);
  4. function IndexOf(const aBand: IBand): Integer; overload;
  5. function GetCount(): Integer;
  6. 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 Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The 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
    aBand
    Band instance being queried or modified.
  • Method name
    DeleteByIndex()
    Type
    procedure
    Description

    Delete the item at the specified zero-based index.

    Declaration

    procedure DeleteByIndex(aIndex: Cardinal); safecall;
    Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(const aBand: IBand); safecall;
    Parameters
    aBandconst
    Band instance being queried or modified.
  • Method name
    IndexOf()
    Type
    Integer
    Description

    Return the zero-based index of the matching item.

    Declaration

    function IndexOf(const aBand: IBand): Integer; overload; safecall;
    Parameters
    aBandconst
    Band instance being queried or modified.
    Returns
    Zero-based index of the matching item, or -1 when 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)
  1. function CreateBand(): IBand;
  2. procedure Add(aBand: IBand);
  3. procedure DeleteByIndex(aIndex: Cardinal);
  4. procedure DeleteById(aId: Int64);
  5. procedure Remove(const aBand: IBand);
  6. function IndexOf(const aBand: IBand): Integer; overload;
  7. function IndexOf(aId: Int64): Integer; overload;
  8. function FindDuplicate(const aBand: IBand; aCheckTitle: Boolean = False): IBand;
  9. function FindByTitle(const aTitle: WideString; aWidth, aThickness: Cardinal): IBand;
  10. function FindUniqueName(const aBaseName: WideString; aWidth, aThickness: Cardinal): WideString;
  11. function CheckUniqueName(const aTitle: WideString; aWidth, aThickness: Cardinal; const aIgnoreBand: IBand): Boolean; overload;
  12. function CheckUniqueName(aBand: IBand; aAutoFix: Boolean = False): Boolean; overload;
  13. function GetCount(): Integer;
  14. function GetByIndex(aIndex: Cardinal): IBand;
  15. function GetById(aId: Int64): IBand;
  16. function GetOnAdd(): IBandChangeEvent;
  17. function GetOnRemove(): IBandChangeEvent;
  18. procedure AddMaterialBandToHistory(aMaterial: IMaterial; aBand: IBand);
  19. function LoadMaterialBandsFromHistory(aMaterial: IMaterial; aLimit: Integer = 5): IBandList;
  20. function LoadMaterialBands(aMaterial: IMaterial): IBandList;
  21. procedure Reload();
  22. procedure BeginUpdate();
  23. procedure EndUpdate();
  24. function IsUpdating(): Boolean;
  25. 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 Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The 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 OnChange instead.

    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 OnChange instead.

    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 to Add. A new object has a temporary negative Id.

    Declaration

    function CreateBand(): IBand; safecall;
    Returns
    A new, empty band that is not yet in the collection; never null.
  • 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. Add does not check title uniqueness, and adding an object that is already in the collection raises an error.

    Declaration

    procedure Add(aBand: IBand); safecall;
    Parameters
    aBand
    Band instance being queried or modified.
  • Method name
    DeleteByIndex()
    Type
    procedure
    Description

    Delete the item at the specified zero-based index.

    Declaration

    procedure DeleteByIndex(aIndex: Cardinal); safecall;
    Parameters
    aIndex
    Cardinal
    Zero-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;
    Parameters
    aId
    Int64
    TonCut object identifier.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(const aBand: IBand); safecall;
    Parameters
    aBandconst
    Band instance being queried or modified.
  • Method name
    IndexOf()
    Type
    Integer
    Description

    Return the zero-based index of the matching item.

    Declaration

    function IndexOf(const aBand: IBand): Integer; overload; safecall;
    Parameters
    aBandconst
    Band instance being queried or modified.
    Returns
    Zero-based index of the matching item, or -1 when 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;
    Parameters
    aId
    Int64
    TonCut object identifier.
    Returns
    Zero-based index of the matching item, or -1 when 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;
    Parameters
    aBandconst
    Band instance being queried or modified.
    aCheckTitle
    Boolean
    Whether title collisions should count as duplicates.
    Returns
    The matching band interface instance, or null when 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;
    Parameters
    aTitleconst
    WideString
    Human-readable title.
    aWidth
    Cardinal
    Width value in hundredths of a millimeter.
    aThickness
    Cardinal
    Thickness value in hundredths of a millimeter.
    Returns
    The matching band interface instance, or null when 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;
    Parameters
    aBaseNameconst
    WideString
    Base title used while generating a unique name.
    aWidth
    Cardinal
    Width value in hundredths of a millimeter.
    aThickness
    Cardinal
    Thickness value in hundredths of a millimeter.
    Returns
    A 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;
    Parameters
    aTitleconst
    WideString
    Human-readable title.
    aWidth
    Cardinal
    Width value in hundredths of a millimeter.
    aThickness
    Cardinal
    Thickness value in hundredths of a millimeter.
    aIgnoreBandconst
    Band to exclude from uniqueness checks.
    Returns
    Returns true if 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;
    Parameters
    aBand
    Band instance being queried or modified.
    aAutoFix
    Boolean
    Whether the method may adjust data automatically.
    Returns
    Returns true if 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;
    Parameters
    aId
    Int64
    TonCut object identifier.
    Returns
    The 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;
    Parameters
    aMaterial
    Material instance being queried or modified.
    aBand
    Band instance being queried or modified.
  • Method name
    LoadMaterialBandsFromHistory()
    Type
    IBandList
    Description

    Load recently used bands for the selected material.

    Declaration

    function LoadMaterialBandsFromHistory(aMaterial: IMaterial; aLimit: Integer = 5): IBandList; safecall;
    Parameters
    aMaterial
    Material instance being queried or modified.
    aLimit
    Integer
    Value for limit.
    Returns
    The 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;
    Parameters
    aMaterial
    Material instance being queried or modified.
    Returns
    The 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 EndUpdate in finally. 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 OnChange only if an add, remove, or item OnChange occurred in the scope; suppressed add/remove callbacks are not replayed. Raises an error without a matching BeginUpdate.

    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;
    Returns
    Returns true while the interface is inside a BeginUpdate / EndUpdate batch.

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)
  1. 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;
    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aBand
    Band instance being queried or modified.
    aIndex
    Integer
    Zero-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)
  1. procedure Add(aHandler: IBandChangeEventHandler);
  2. procedure Remove(aHandler: IBandChangeEventHandler);
  3. 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
    aHandler
    The handler interface instance to use.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(aHandler: IBandChangeEventHandler); safecall;
    Parameters
    aHandler
    The handler interface instance to use.
  • 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;
    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aBand
    Event payload field for band.
    aIndex
    Integer
    Event payload field for index.

Was this page helpful?