Pieces

This page covers IFormat, IFormats, IFormatChangeEvent, and IFormatChangeEventHandler. In TonCut Desktop, format is the public piece model: geometry, quantity, material, orientation, edging, grind metadata, project grouping, and commercial metadata all live here. Grind fields are part of the ABI, but TonCut currently ignores them.

Each IFormat also owns mutable ITcAlgorithmData that must travel with that piece. Its payload is opaque and implementation-defined; no public key/value schema or compatibility guarantee is provided.

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.

IFormat

Piece definition used by Desktop importers. It combines project assignment, geometry, material, edging, grind metadata, and planning fields. Grind data is part of the ABI, but TonCut currently ignores it.

IID
{9B47E250-1F63-4A8D-97C2-6E05B3D81A94}
Parent
IUnknown (implicit: a Delphi interface without a parent is IUnknown)
Unit
uIFormat
Vtable order (72 methods, slots 3 to 74, after the three IUnknown slots)
  1. function GetId(): Int64;
  2. procedure SetId(aId: Int64);
  3. function GetProject(): IProject;
  4. procedure SetProject(const aProject: IProject);
  5. function GetLength(): Cardinal;
  6. procedure SetLength(aLength: Cardinal);
  7. function GetWidth(): Cardinal;
  8. procedure SetWidth(aWidth: Cardinal);
  9. function GetQuantity(): Cardinal;
  10. procedure SetQuantity(aQuantity: Cardinal);
  11. function GetProcessedQuantity(): Cardinal;
  12. procedure SetProcessedQuantity(aQuantity: Cardinal);
  13. function GetOrnament(): TOrnaments;
  14. procedure SetOrnament(aOrnament: TOrnaments);
  15. function GetIdentifier(): WideString;
  16. procedure SetIdentifier(const aIdentifier: WideString);
  17. function GetDescription(): WideString;
  18. procedure SetDescription(const aDescription: WideString);
  19. function GetShape(): IShape;
  20. procedure SetShape(const aShape: IShape);
  21. function GetRotationStep(): TRotation;
  22. procedure SetRotationStep(aStep: TRotation);
  23. function GetRotation(): TRotation;
  24. procedure SetRotation(aRotation: TRotation);
  25. function GetMirror(): Boolean;
  26. procedure SetMirror(aMirror: Boolean);
  27. function GetMaterial(): IMaterial;
  28. procedure SetMaterial(const aMaterial: IMaterial);
  29. function GetSurplus(): Cardinal;
  30. procedure SetSurplus(aSurplus: Cardinal);
  31. function GetMargin(): Cardinal;
  32. procedure SetMargin(aMargin: Cardinal);
  33. function GetBanding(): IBanding;
  34. function GetGrinds(): IGrinds;
  35. function GetColor(): WideString;
  36. procedure SetColor(const aColor: WideString);
  37. function GetPriority(): Integer;
  38. procedure SetPriority(aPriority: Integer);
  39. function GetWeight(): Double;
  40. procedure SetWeight(aWeight: Double);
  41. function GetWeightModifier(): Double;
  42. procedure SetWeightModifier(aModifier: Double);
  43. function GetGroup(): Word;
  44. procedure SetGroup(aGroup: Word);
  45. function GetOrder(): Word;
  46. procedure SetOrder(aOrder: Word);
  47. function GetSellingPrice(): TTcPrice;
  48. procedure SetSellingPrice(aPrice: TTcPrice);
  49. function GetStorageCost(): TTcPrice;
  50. procedure SetStorageCost(aCost: TTcPrice);
  51. function GetCustomData(): WideString;
  52. procedure SetCustomData(const aData: WideString);
  53. function GetAlgorithmData(): ITcAlgorithmData;
  54. function GetEffectivePriority(): Integer;
  55. function GetLeftQuantity(): Cardinal;
  56. function GetTotalSurplus(): Cardinal;
  57. function GetTotalMargin(): Cardinal;
  58. function GetTotalLength(): Cardinal;
  59. function GetTotalWidth(): Cardinal;
  60. function GetTotalField(): TField;
  61. function GetGrossLength(): Cardinal;
  62. function GetGrossWidth(): Cardinal;
  63. function GetShapePathAsString(aRotation: Double; aMirror: Boolean; aWithOffset, aBBoxOrigin: Boolean): WideString;
  64. procedure GetShapeOffsetInsideBoundingBox(aRotation: Double; aMirror: Boolean; var aX, aY: Double);
  65. procedure Assign(const aOther: IFormat; aProject: IProject);
  66. function GetOnChange(): INotifyEvent;
  67. function GetOnIdChange(): IIdChangeEvent;
  68. procedure UpdateEffectivePriority(aTriggerChange: Boolean);
  69. procedure BeginUpdate();
  70. procedure EndUpdate();
  71. function GetPreviewColor(): TTcColor;
  72. 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
    Project
    Type
    IProject
    Description

    Project linked to the object.

    Declaration

    property Project: IProject read GetProject write SetProject;
  • Property name
    Length
    Type
    Cardinal
    Description

    Length value stored on the object.

    Declaration

    property Length: Cardinal read GetLength write SetLength;
  • Property name
    Width
    Type
    Cardinal
    Description

    Piece width in hundredths of a millimeter. A 1D piece always has its material’s width.

    Declaration

    property Width: Cardinal read GetWidth write SetWidth;
  • Property name
    Quantity
    Type
    Cardinal
    Description

    Number of pieces required.

    Declaration

    property Quantity: Cardinal read GetQuantity write SetQuantity;
  • Property name
    ProcessedQuantity
    Type
    Cardinal
    Description

    Quantity already processed by TonCut.

    Declaration

    property ProcessedQuantity: Cardinal read GetProcessedQuantity write SetProcessedQuantity;
  • Property name
    Ornament
    Type
    Description

    Grain or ornament direction associated with the stock item.

    Declaration

    property Ornament: TOrnaments read GetOrnament write SetOrnament;
  • Property name
    Identifier
    Type
    WideString
    Description

    Piece code. TonCut shows it in some label modes and encodes it in barcodes.

    Declaration

    property Identifier: WideString read GetIdentifier write SetIdentifier;
  • Property name
    Description
    Type
    WideString
    Description

    Piece name shown to the user.

    Declaration

    property Description: WideString read GetDescription write SetDescription;
  • Property name
    Shape
    Type
    IShape
    Description

    Shape object linked to the current entity.

    Declaration

    property Shape: IShape read GetShape write SetShape;
  • Property name
    RotationStep
    Type
    TRotation
    Description

    Allowed rotation step as a TRotation, in tenths of a degree.

    Declaration

    property RotationStep: TRotation read GetRotationStep write SetRotationStep;
  • Property name
    Rotation
    Type
    TRotation
    Description

    Fixed rotation of the piece as a TRotation, in tenths of a degree (cRotation90 = 900).

    Declaration

    property Rotation: TRotation read GetRotation write SetRotation;
  • Property name
    Mirror
    Type
    Boolean
    Description

    Mirror state for the current object.

    Declaration

    property Mirror: Boolean read GetMirror write SetMirror;
  • Property name
    Material
    Type
    IMaterial
    Description

    Material linked to the object.

    Declaration

    property Material: IMaterial read GetMaterial write SetMaterial;
  • Property name
    Surplus
    Type
    Cardinal
    Description

    Surplus allowance stored on the object.

    Declaration

    property Surplus: Cardinal read GetSurplus write SetSurplus;
  • Property name
    Margin
    Type
    Cardinal
    Description

    Margin allowance stored on the object.

    Declaration

    property Margin: Cardinal read GetMargin write SetMargin;
  • Property name
    Banding
    Type
    IBanding
    Description

    Gets the linked banding interface.

    Declaration

    property Banding: IBanding read GetBanding;
  • Property name
    Grinds
    Type
    IGrinds
    Description

    Associated grinds collection or helper interface.

    Declaration

    property Grinds: IGrinds read GetGrinds;
  • Property name
    Color
    Type
    WideString
    Description

    Color information stored with the object.

    Declaration

    property Color: WideString read GetColor write SetColor;
  • Property name
    Priority
    Type
    Integer
    Description

    Piece priority: cPiecePriorityDefault (0) inherits the project priority, cPiecePriorityNormal (1), cPiecePriorityHigh (10), cPiecePriorityCritical (100). New pieces default to 0 when TonCut uses projects and to 1 otherwise.

    Declaration

    property Priority: Integer read GetPriority write SetPriority;
  • Property name
    Weight
    Type
    Double
    Description

    Weight value stored on the object.

    Declaration

    property Weight: Double read GetWeight write SetWeight;
  • Property name
    WeightModifier
    Type
    Double
    Description

    Weight multiplier or correction factor.

    Declaration

    property WeightModifier: Double read GetWeightModifier write SetWeightModifier;
  • Property name
    Group
    Type
    Word
    Description

    Gets or sets group.

    Declaration

    property Group: Word read GetGroup write SetGroup;
  • Property name
    Order
    Type
    Word
    Description

    Gets or sets order.

    Declaration

    property Order: Word read GetOrder write SetOrder;
  • Property name
    SellingPrice
    Type
    TTcPrice
    Description

    Selling price assigned to the object.

    Declaration

    property SellingPrice: TTcPrice read GetSellingPrice write SetSellingPrice;
  • Property name
    StorageCost
    Type
    TTcPrice
    Description

    Gets or sets storage cost.

    Declaration

    property StorageCost: TTcPrice read GetStorageCost write SetStorageCost;
  • Property name
    PreviewColor
    Type
    TTcColor
    Description

    Gets or sets the color used when this piece 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
    CustomData
    Type
    WideString
    Description

    Opaque custom text payload stored with the object.

    Declaration

    property CustomData: WideString read GetCustomData write SetCustomData;
  • Property name
    AlgorithmData
    Type
    ITcAlgorithmData
    Description

    Mutable access to opaque, implementation-defined algorithm data owned by the current device, material, piece, or stock sheet. No public payload schema or compatibility guarantee is provided.

    Declaration

    property AlgorithmData: ITcAlgorithmData read GetAlgorithmData;

    No C++ declaration in the SDK's language-support manifest. If your TonCutPluginSdk.hpp lacks it, declare it in the vtable order shown above.

  • Property name
    EffectivePriority
    Type
    Integer
    Description

    Gets effective priority.

    Declaration

    property EffectivePriority: Integer read GetEffectivePriority;
  • Property name
    LeftQuantity
    Type
    Cardinal
    Description

    Gets left quantity.

    Declaration

    property LeftQuantity: Cardinal read GetLeftQuantity;
  • Property name
    TotalSurplus
    Type
    Cardinal
    Description

    Combined surplus value used by the current object.

    Declaration

    property TotalSurplus: Cardinal read GetTotalSurplus;
  • Property name
    TotalMargin
    Type
    Cardinal
    Description

    Combined margin value used by the current object.

    Declaration

    property TotalMargin: Cardinal read GetTotalMargin;
  • Property name
    TotalLength
    Type
    Cardinal
    Description

    Gets total length.

    Declaration

    property TotalLength: Cardinal read GetTotalLength;
  • Property name
    TotalWidth
    Type
    Cardinal
    Description

    Total width after TonCut applies edge and surplus adjustments.

    Declaration

    property TotalWidth: Cardinal read GetTotalWidth;
  • Property name
    TotalField
    Type
    TField
    Description

    Gets total field.

    Declaration

    property TotalField: TField read GetTotalField;
  • Property name
    GrossLength
    Type
    Cardinal
    Description

    Gets gross length.

    Declaration

    property GrossLength: Cardinal read GetGrossLength;
  • Property name
    GrossWidth
    Type
    Cardinal
    Description

    Gets gross width.

    Declaration

    property GrossWidth: Cardinal read GetGrossWidth;
  • 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
    GetShapePathAsString()
    Type
    WideString
    Description

    Return an SVG-compatible path string for the current shape outline.

    Declaration

    function GetShapePathAsString(aRotation: Double; aMirror: Boolean; aWithOffset: Boolean; aBBoxOrigin: Boolean): WideString; safecall;
    Parameters
    aRotation
    Double
    Value for rotation.
    aMirror
    Boolean
    Boolean flag controlling mirror.
    aWithOffset
    Boolean
    Boolean flag controlling with offset.
    aBBoxOrigin
    Boolean
    Boolean flag controlling bbox origin.
    Returns
    The SVG-compatible path string for the current shape outline.
  • Method name
    GetShapeOffsetInsideBoundingBox()
    Type
    procedure
    Description

    Return or populate shape offset inside bounding box.

    Declaration

    procedure GetShapeOffsetInsideBoundingBox(aRotation: Double; aMirror: Boolean; var aX: Double; var aY: Double); safecall;
    Parameters
    aRotation
    Double
    Value for rotation.
    aMirror
    Boolean
    Boolean flag controlling mirror.
    aXvar
    Double
    X coordinate in hundredths of a millimeter. Passed by reference and may be updated by the callee.
    aYvar
    Double
    Y coordinate in hundredths of a millimeter. Passed by reference and may be updated by the callee.
  • Method name
    Assign()
    Type
    procedure
    Description

    Copy values from another object of the same type.

    Declaration

    procedure Assign(const aOther: IFormat; aProject: IProject); safecall;
    Parameters
    aOtherconst
    Source object whose values should be copied.
    aProject
    Project instance being queried or modified.
  • Method name
    UpdateEffectivePriority()
    Type
    procedure
    Description

    Update effective priority.

    Declaration

    procedure UpdateEffectivePriority(aTriggerChange: Boolean); safecall;
    Parameters
    aTriggerChange
    Boolean
    Boolean flag controlling trigger change.
  • 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;

IFormats

Collection interface used to create, enumerate, query, and reload a shared Desktop object set.

IID
{42199936-3DD0-4680-93DE-433D43E6573B}
Parent
IUnknown (implicit: a Delphi interface without a parent is IUnknown)
Unit
uIFormats
Vtable order (32 methods, slots 3 to 34, after the three IUnknown slots)
  1. procedure Assign(const aOther: IFormats);
  2. procedure Clear();
  3. procedure Reload();
  4. function CreateFormat(): IFormat;
  5. procedure Add(aFormat: IFormat);
  6. procedure DeleteByIndex(aIndex: Cardinal);
  7. procedure DeleteById(aId: Int64);
  8. procedure Remove(const aFormat: IFormat);
  9. function IndexOf(const aFormat: IFormat): Integer; overload;
  10. function IndexOf(aId: Int64): Integer; overload;
  11. function IndexOf(aList: array of Int64; const aMaterial: IMaterial; aLength, aWidth: Cardinal; aOrnament: TOrnament; var aRotated: Boolean; var aListIndex: Integer): Integer; overload;
  12. function IndexOf(const aOtherFormat: IFormat; aSkipId: Int64; var aRotated: Boolean): Integer; overload;
  13. function Find(aLength, aWidth: Cardinal; var aRotated: Boolean): IFormat;
  14. function GetCount(): Integer;
  15. function GetByIndex(aIndex: Cardinal): IFormat;
  16. function GetById(aId: Int64): IFormat;
  17. procedure LoadByProject(aProject: IProject; aFormats: IFormats); overload;
  18. procedure LoadByProject(aProject: IProject); overload;
  19. function GetByProject(aProject: IProject): IFormats;
  20. procedure UnloadByProject(const aProject: IProject);
  21. procedure UnloadFormat(const aFormat: IFormat);
  22. function CalcMaxLength(): Cardinal;
  23. function GetField(): TField;
  24. function GetQuantity(): Cardinal;
  25. function GetLoading(): Boolean;
  26. procedure SetLoading(aLoading: Boolean);
  27. function GetOnAdd(): IFormatChangeEvent;
  28. function GetOnRemove(): IFormatChangeEvent;
  29. function GetOnChange(): INotifyEvent;
  30. procedure BeginUpdate();
  31. procedure EndUpdate();
  32. function IsUpdating(): Boolean;

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
    IFormat
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: IFormat read GetByIndex; default;
    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.
  • Property name
    Field
    Type
    TField
    Description

    Area-like value stored on the object.

    Declaration

    property Field: TField read GetField;
  • Property name
    Quantity
    Type
    Cardinal
    Description

    Quantity associated with the current object.

    Declaration

    property Quantity: Cardinal read GetQuantity;
  • Property name
    Loading
    Type
    Boolean
    Description

    Whether the project or collection is currently loading data.

    Declaration

    property Loading: Boolean read GetLoading write SetLoading;
  • Property name
    OnAdd
    Type
    IFormatChangeEvent
    Description

    Event fired when an item is added.

    Declaration

    property OnAdd: IFormatChangeEvent read GetOnAdd;
  • Property name
    OnRemove
    Type
    IFormatChangeEvent
    Description

    Event fired when an item is removed.

    Declaration

    property OnRemove: IFormatChangeEvent read GetOnRemove;
  • 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: IFormats); safecall;
    Parameters
    aOtherconst
    Source object whose values should be copied.
  • Method name
    Clear()
    Type
    procedure
    Description

    Remove all items from the collection.

    Declaration

    procedure Clear(); safecall;
  • Method name
    Reload()
    Type
    procedure
    Description

    Reload the underlying data from the host or storage layer.

    Declaration

    procedure Reload(); safecall;
  • Method name
    CreateFormat()
    Type
    IFormat
    Description

    Create a new, empty format. 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 CreateFormat(): IFormat; safecall;
    Returns
    A new, empty format 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(aFormat: IFormat); safecall;
    Parameters
    aFormat
    Format 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 aFormat: IFormat); safecall;
    Parameters
    aFormatconst
    Format instance being queried or modified.
  • Method name
    IndexOf()
    Type
    Integer
    Description

    Return the zero-based index of the matching item.

    Declaration

    function IndexOf(const aFormat: IFormat): Integer; overload; safecall;

    C++ name: IndexOfByObject. The C++ header gives each Pascal overload its own name; the vtable slot is the same.

    Parameters
    aFormatconst
    Format 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;

    C++ name: IndexOfById. The C++ header gives each Pascal overload its own name; the vtable slot is the same.

    Parameters
    aId
    Int64
    TonCut object identifier.
    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(aList: array of Int64; const aMaterial: IMaterial; aLength: Cardinal; aWidth: Cardinal; aOrnament: TOrnament; var aRotated: Boolean; var aListIndex: Integer): Integer; overload; safecall;

    C++ name: IndexOfByList. The C++ header gives each Pascal overload its own name; the vtable slot is the same.

    Parameters
    aList
    array of Int64
    Value for list.
    aMaterialconst
    Material instance being queried or modified.
    aLength
    Cardinal
    Length value in hundredths of a millimeter.
    aWidth
    Cardinal
    Width value in hundredths of a millimeter.
    aOrnament
    Value for ornament.
    aRotatedvar
    Boolean
    Boolean flag controlling rotated. Passed by reference and may be updated by the callee.
    aListIndexvar
    Integer
    Value for list index. Passed by reference and may be updated by the callee.
    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(const aOtherFormat: IFormat; aSkipId: Int64; var aRotated: Boolean): Integer; overload; safecall;

    C++ name: IndexOfByOther. The C++ header gives each Pascal overload its own name; the vtable slot is the same.

    Parameters
    aOtherFormatconst
    The other format interface instance to use.
    aSkipId
    Int64
    skip id value used to identify an object.
    aRotatedvar
    Boolean
    Boolean flag controlling rotated. Passed by reference and may be updated by the callee.
    Returns
    Zero-based index of the matching item, or -1 when no match exists.
  • Method name
    Find()
    Type
    IFormat
    Description

    Find an item matching the supplied criteria.

    Declaration

    function Find(aLength: Cardinal; aWidth: Cardinal; var aRotated: Boolean): IFormat; safecall;
    Parameters
    aLength
    Cardinal
    Length value in hundredths of a millimeter.
    aWidth
    Cardinal
    Width value in hundredths of a millimeter.
    aRotatedvar
    Boolean
    Boolean flag controlling rotated. Passed by reference and may be updated by the callee.
    Returns
    The matching format interface instance, or null when not found.
  • Method name
    GetById()
    Type
    IFormat
    Description

    Return the item stored under the specified TonCut identifier.

    Declaration

    function GetById(aId: Int64): IFormat; safecall;
    Parameters
    aId
    Int64
    TonCut object identifier.
    Returns
    The matching format interface instance.
  • Method name
    LoadByProject()
    Type
    procedure
    Description

    Load by project.

    Declaration

    procedure LoadByProject(aProject: IProject; aFormats: IFormats); overload; safecall;

    C++ name: LoadByProjectInto. The C++ header gives each Pascal overload its own name; the vtable slot is the same.

    Parameters
    aProject
    Project instance being queried or modified.
    aFormats
    Piece collection: a new, empty staging collection in LoadFile, the live pieces in SaveFile. Do not keep it after the call.
  • Method name
    LoadByProject()
    Type
    procedure
    Description

    Load by project.

    Declaration

    procedure LoadByProject(aProject: IProject); overload; safecall;
    Parameters
    aProject
    Project instance being queried or modified.
  • Method name
    GetByProject()
    Type
    IFormats
    Description

    Return or populate by project.

    Declaration

    function GetByProject(aProject: IProject): IFormats; safecall;
    Parameters
    aProject
    Project instance being queried or modified.
    Returns
    The matching formats interface instance.
  • Method name
    UnloadByProject()
    Type
    procedure
    Description

    Perform unload by project.

    Declaration

    procedure UnloadByProject(const aProject: IProject); safecall;
    Parameters
    aProjectconst
    Project instance being queried or modified.
  • Method name
    UnloadFormat()
    Type
    procedure
    Description

    Perform unload format.

    Declaration

    procedure UnloadFormat(const aFormat: IFormat); safecall;
    Parameters
    aFormatconst
    Format instance being queried or modified.
  • Method name
    CalcMaxLength()
    Type
    Cardinal
    Description

    Calculate max length.

    Declaration

    function CalcMaxLength(): Cardinal; safecall;
    Returns
    The calculated max length value.
  • 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;
  • Method name
    IsUpdating()
    Type
    Boolean
    Description

    Report whether the interface is currently inside an update batch.

    Declaration

    function IsUpdating(): Boolean; safecall;
    Returns
    Returns true while the interface is inside a BeginUpdate / EndUpdate batch.

IFormatChangeEventHandler

Callback sink consumed by the matching change-event interface.

IID
{02973286-E67D-4469-8502-70BCE455FE4B}
Parent
IUnknown
Unit
uIFormatChangeEvent

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; aFormat: IFormat; 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; aFormat: IFormat; aIndex: Integer); safecall;
    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aFormat
    Format instance being queried or modified.
    aIndex
    Integer
    Zero-based position within a collection.

IFormatChangeEvent

Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.

IID
{87F91622-3567-415E-9765-CB562911773F}
Parent
IUnknown
Unit
uIFormatChangeEvent

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: IFormatChangeEventHandler);
  2. procedure Remove(aHandler: IFormatChangeEventHandler);
  3. procedure Invoke(aSender: IUnknown; aFormat: IFormat; aIndex: Integer);

Methods

  • Method name
    Add()
    Type
    procedure
    Description

    Add an item or handler.

    Declaration

    procedure Add(aHandler: IFormatChangeEventHandler); safecall;
    Parameters
    aHandler
    The handler interface instance to use.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(aHandler: IFormatChangeEventHandler); 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; aFormat: IFormat; aIndex: Integer); safecall;
    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aFormat
    Event payload field for format.
    aIndex
    Integer
    Event payload field for index.

Was this page helpful?