true.- I
Remarks
Members
Constructors
Initializes a new instance of the InputModeBase class.
Parameters
- exclusive?: boolean
- Whether this mode should be exclusive. The default value is
true
Properties
Gets the installed controller.
The value of this property will be delegated to the exclusive property of the controller.
If this mode is marked as exclusive and has the mutex, all other modes added to the same MultiplexingInputMode will be deactivated. Otherwise, it will always run concurrently with all other modes.
Gets whether this mode is currently installed so a call to parentInputModeContext will yield a non- null result.
null result.Gets the context instance this mode is currently installed in or null if this instance is not installed.
null if this instance is not installed.Implements
IInputMode.priorityMethods
Cancels the editing of this mode by first disabling and afterward re-enabling the installed controller.
See Also
API
- onCanceled, canceled
Implements
IInputMode.cancelReturn Value
- boolean
- Whether a call to requestMutex would currently succeed.
Creates an implementation of IInputModeContext that is specific to this mode.
This is needed for events that are triggered by this InputMode to signal where the event is coming from. A common usage for this is, for example, in isHit calls.
The result can be given to isHit or enumerateHits to let implementations of IHitTestable get access to the current IInputModeContext. This can be done by looking up IInputModeContext from the ICanvasContext's lookup method or simply downcasting.
Return Value
- IInputModeContext
- A readily configured IInputModeContext.
See Also
Helper method that yields a suitably configured InputModeEventArgs for this input mode.
Parameters
- context: IInputModeContext
An input mode context that should be made available in the context property.
May be omitted, in which case a child context for this instance is created automatically.
Return Value
- InputModeEventArgs
- An input mode event argument that is configured for this instance.
false.Return Value
- boolean
- Whether this instance has the input mutex.
This method should not be invoked by subclasses. This will be done automatically upon first installation of this mode.
This code will be executed only once per instance. The parentInputModeContext property will be null when this code is executed. This method should not be used to install this mode into a specific canvas. Subclasses should always call base.Initialize() first.
See Also
API
- install
Installs this mode into a CanvasComponent using the provided IInputModeContext.
base.Install(context), first. One-time initialization should be performed in the initialize method. This implementation will call the initialize method the first time this mode gets installed. The initialization will be surrounded by calls to onInitializing and onInitialized to trigger the corresponding events.Parameters
- context: IInputModeContext
- the context to install this mode into
- controller: ConcurrencyController
- The controller for this mode.
See Also
Implements
IInputMode.installEvent dispatch method that will dispatch the canceled event.
Parameters
- evt: InputModeEventArgs
- The event arguments.
See Also
API
- initialize
Can be overridden in subclasses to perform additional actions after the mode has been activated.
Overriding implementations should call the base implementation.
Can be overridden in subclasses to perform additional actions after the mode has been deactivated.
Overriding implementations should call the base implementation.
Event dispatch method that will dispatch the initialized event.
Parameters
- evt: InputModeEventArgs
- The event arguments.
See Also
API
- initialize
Event dispatch method that will dispatch the initializing event.
Parameters
- evt: InputModeEventArgs
- The event arguments.
See Also
API
- initialize
Event dispatch method that will dispatch the stopped event.
Requests capturing of all keyboard input that happens in the CanvasComponent.
true, which will prevent visuals inside the canvas from stealing keystrokes.See Also
Requests the mutex from the current controller.
Throws
- Exception ({ name: 'Error' })
- If the mutex could not be obtained.
true, which will prevent visuals inside the canvas from stealing mouse input.See Also
This implementation returns if this instance does not currently have the input mutex.
This implementation calls onStopped. Subclasses that want to prevent a stop or need to do special clean up should do this here if the base class implementation of tryStop returns true. A typical implementation should follow this idiom if it wants to stop:
if (mode.tryStop()) {
// do cleanup
return true
}
return falseIf it doesn't want to stop, simply return false immediately.
Calling this method raises the stopped event.
Return Value
- boolean
trueiff this instance does not own the mutex.
See Also
API
- onStopped
Implements
IInputMode.tryStopUninstalls this mode from the canvas.
base.Uninstall(context) as the last statement.Parameters
- context: IInputModeContext
- The context to remove this mode from. This is the same instance that has been passed to install.
Implements
IInputMode.uninstallEvents
Occurs after the call to cancel
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
API
- onCanceled, cancel, tryStop, stopped
Occurs after the call to initialize
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
API
- install
Occurs before the call to initialize
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
API
- install
Occurs after the call to tryStop
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.