Class ManipulationPhaseExtensions
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Extension methods for ManipulationPhase.
public static class ManipulationPhaseExtensions
- Inheritance
-
ManipulationPhaseExtensions
- Inherited Members
Methods
CanCancel(ManipulationPhase)
Determines whether this phase can be cancelled via user input.
public static bool CanCancel(this ManipulationPhase phase)
Parameters
phaseManipulationPhaseThe phase to check.
Returns
- bool
True if the phase is Starting or Active.
Remarks
Once Finalizing begins, cancellation is no longer possible — the operation is already in the process of being committed or cleaned up.
IsActivePhase(ManipulationPhase)
Determines whether this phase is an active manipulation phase. Active phases are those where the user is still interacting with the preview.
public static bool IsActivePhase(this ManipulationPhase phase)
Parameters
phaseManipulationPhaseThe phase to check.
Returns
- bool
True if the phase is Starting, Active, or Finalizing.
Remarks
Useful for gating input: only allow cursor movement during Active phase, allow cancellation during Starting and Active.
IsTerminalPhase(ManipulationPhase)
Determines whether this phase is a terminal phase. Terminal phases transition to no further state changes until a new Start().
public static bool IsTerminalPhase(this ManipulationPhase phase)
Parameters
phaseManipulationPhaseThe phase to check.
Returns
- bool
True if the phase is Completed or Cancelled.
ToDisplayString(ManipulationPhase)
Converts ManipulationPhase to a user-displayable string.
public static string ToDisplayString(this ManipulationPhase phase)
Parameters
phaseManipulationPhase