RendererCommandExecutor
public class RendererCommandExecutor
RendererCommandExecutor
manages all the RendererView
in the main RendererView
. Sub renderers may have been added as Attachment
in the RendererView
.
All the RendererView
s in the hierarchy sharing the same RendererContext
will automatically be handled by the RendererCommandExecutor
.
RendererCommandExecutor
keeps the track of the RendererView
that has been selected and executes the given command in the active RendererView
.
-
Initializes the
RendererCommandExecutor
Declaration
Swift
public init(context: RendererViewContext = RendererViewContext.shared)
Parameters
context
The context for the command executor.
RendererCommandExecutor
is capable of executing commands only on theRendererView
s which are created using the samecontext
. Default value isRendererViewContext.shared
-
Executes the given command on the active
RendererView
having the sameContext
as the Command Executor.RendererCommand
will be executed only if theRendererCommand.canExecute()
returnstrue
for the selectedRendererView
.Declaration
Swift
public func execute(_ command: RendererCommand)
Parameters
command
Command to execute