BaseTool (object)

バージョン 2.0.1 で追加.

BaseTool is a special BaseHandler that implements :kl-ref:`Tool Custom tools should specialize this class.

BaseTool BaseTool BaseTool BaseHandler BaseHandler BaseTool->BaseHandler Tool Tool BaseTool->Tool EventHandler EventHandler BaseHandler->EventHandler BasePaintTool BasePaintTool BasePaintTool->BaseTool BaseColorAttributePaintTool BaseColorAttributePaintTool BaseColorAttributePaintTool->BasePaintTool BaseScalarAttributePaintTool BaseScalarAttributePaintTool BaseScalarAttributePaintTool->BasePaintTool BaseSculptTool BaseSculptTool BaseSculptTool->BasePaintTool BaseSRTTool BaseSRTTool BaseSRTTool->BaseTool BaseSliderTool BaseSliderTool BaseSliderTool->BaseTool CameraTool CameraTool CameraTool->BaseTool

Members

Boolean enabled Handler is enabled.
Key enableKey Enable key.
HandlerExclusivity handlerExclusivity Handler exclusivity.
Boolean isIndependent HandlerExclusivity local override.
Boolean takeAllEvents It true, the handler takes all the events.
Boolean alwaysEnabled It true, the handler takes all the events.
Boolean isOwnedByDispatcher Checks if the handler is owned by a handlerDispatcher. In most of the cases, the dispatcher owns the handlers. However, it’s not true in DFG graphs where the handlers are owns by the nodes.
Ref<HandlerDispatcher> dispatcher Reference to the dispatcher.
ToolTarget target Tool target.
Boolean performing True if the tool is performing an action.

Methods

  BaseTool ( in BaseTool other )
  BaseTool ()
  activate ! ()
BaseTool clone ? ()
  deActivate ! ()
  disable ! ()
  enable ! ()
HandlerDescription getDescription ? ()
Ref<ToolTarget> getTarget ? ()
  hide ! ()
  init ! ( in ToolTarget target, in Key enableKey, in HandlerExclusivity exclusivity, in Boolean isIndependent, in Boolean takeAllEvents, in Boolean isOwnedByDispatche )
  init ! ( in ToolTarget target, in Key enableKey, in HandlerExclusivity exclusivity, in Boolean isOwnedByDispatche )
Boolean isPerforming ? ()
  move ! ( io MouseEvent mouseEvent )
  onEvent ! ( io Event event )
  press ! ( io MouseEvent mouseEvent )
  release ! ( io MouseEvent mouseEvent )
  setTarget ! ( in ToolTarget target )
  show ! ()
Boolean showIfTarget ! ()
  updateFromTarget ! ()

Methods in detail

BaseTool ( in BaseTool other )

copy constructor


BaseTool ()

default constructor


BaseTool.activate! ()

Implementation of Tool. To overwrite.


BaseTool BaseTool.clone? ()

clone method


BaseTool.deActivate! ()

Implementation of Tool. To override.


BaseTool.disable! ()

Implementation of EventHandler.


BaseTool.enable! ()

Implementation of EventHandler.


HandlerDescription BaseTool.getDescription? ()

Implementation of EventHandler.


Ref<ToolTarget> BaseTool.getTarget? ()

Implementation of Tool.


BaseTool.hide! ()

Implementation of Tool. To override.


BaseTool.init! ( in ToolTarget target, in Key enableKey, in HandlerExclusivity exclusivity, in Boolean isIndependent, in Boolean takeAllEvents, in Boolean isOwnedByDispatche )

Initializes a BaseTool.

target Tool target.
enableKey The key that enables/disables the tool.
exclusivity Handler exclusivity.
isIndependent If true, independent tool.
takeAllEvents If true, force this tool to get all the events.
isOwnedByDispatcher If true, owned by the dispatcher when registered.


BaseTool.init! ( in ToolTarget target, in Key enableKey, in HandlerExclusivity exclusivity, in Boolean isOwnedByDispatche )

Initializes a BaseTool, no-independent and doesn’t take all the events.

target Tool target.
enableKey The key that enables/disables the tool.
exclusivity Handler exclusivity.
isOwnedByDispatcher If true, owned by the dispatcher when registered.


Boolean BaseTool.isPerforming? ()

Returns true if this tool is currently the focus of an action (eg: mouse drag).


BaseTool.move! ( io MouseEvent mouseEvent )

Implementation of Tool. To override.


BaseTool.onEvent! ( io Event event )

Implementation of EventHandler. To override.


BaseTool.press! ( io MouseEvent mouseEvent )

Implementation of Tool. To override.


BaseTool.release! ( io MouseEvent mouseEvent )

Implementation of Tool. To override.


BaseTool.setTarget! ( in ToolTarget target )

Implementation of Tool.


BaseTool.show! ()

Implementation of Tool. To override.


Boolean BaseTool.showIfTarget! ()

If enabled with a valid target, will show and return true. Otherwise, will hide and return false. This is a service that can be called at the beginning of updateFromTarget() if the tool is shown only with valid targets. In that case, the updateFromTarget() body might be executed only if true is returned.


BaseTool.updateFromTarget! ()

Implementation of Tool. To override.