Hosanna UI API v1.30.2-next
    Preparing search index...

    Interface IViewManager

    Interface for managing views, their state, layout, and error tracking.

    interface IViewManager {
        _tick(): void;
        clearViewsWithErrors(): void;
        forceInvalidateViewState(
            view: BaseView.BaseView<ViewState, ISGNGroup>,
        ): void;
        getViewsWithErrors(): BaseView.BaseView<ViewState, ISGNGroup>[];
        invalidateViewLayout(view: IHosannaView<ViewState>): void;
        invalidateViewState(view: IHosannaView<ViewState>): void;
        registerControlWithError(errorObj: IDebugErrorObject, view?: any): void;
        registerForCleanup(view: IHosannaView<ViewState>): void;
        unregisterControlWithError(view: any): void;
    }

    Implemented by

    Index

    Methods

    • Called on each tick/frame to update view manager state.

      Returns void

    • Clears the list of views with errors.

      Returns void

    • Forces the state of the specified view to be marked dirty, then invalidates it. Use when external state changes require getViews() to run even though the view's own state fields did not mutate.

      Parameters

      Returns void

    • Invalidates the layout of the specified view, causing it to be recalculated.

      Parameters

      • view: IHosannaView<ViewState>

        The view whose layout should be invalidated.

      Returns void

    • Invalidates the state of the specified view, causing it to be re-rendered or updated.

      Parameters

      • view: IHosannaView<ViewState>

        The view whose state should be invalidated.

      Returns void

    • Registers a control (view) with an error for debugging purposes.

      Parameters

      • errorObj: IDebugErrorObject

        The error object containing debug information.

      • Optionalview: any

        The view associated with the error.

      Returns void

    • Registers a detached view for deferred cleanup at end of the current ViewManager tick. Used when removeSubView must not call release() synchronously (e.g. reconciliation).

      Parameters

      • view: IHosannaView<ViewState>

      Returns void

    • Unregisters a control (view) from error tracking.

      Parameters

      • view: any

        The view to unregister.

      Returns void