TTMSFNCCustomStateManager Class
Base class for state manager components that capture, store, and restore named JSON snapshots of a control tree's published properties.
API unit family: TMSFNCStateManager
Inherits from: TTMSFNCCustomComponent
Syntax
TTMSFNCCustomStateManager = class(TTMSFNCCustomComponent)
Methods
| Name | Description |
|---|---|
| BeginUpdate | Suspends state loading and other update notifications until EndUpdate is called. |
| EndUpdate | Resumes update notifications suspended by BeginUpdate. |
| FindConflicts | Checks whether any control names referenced in the stored states are ambiguous within the managed control tree. |
| FindStateByName | Returns the state item with the specified name, or nil if not found. |
| GetDefaultState | Returns the state item that has its Default flag set, or nil if none exists. |
| LoadStateByIndex | Loads and applies the state at the given collection index to the managed control tree. |
| LoadStateByName | Loads and applies the state with the given name to the managed control tree. |
| LoadStateCustom | Iterates over all states and applies the first one for which the optional callback returns True. |
| Optimize | Removes duplicate control entries across all stored state snapshots to reduce serialized content size. |
| SaveToState | Saves the current control tree state into the specified state item, replacing its content. |