ShapeRoot (クラス)
public abstract ShapeRoot {inherits ShapeContainerBase}
パッケージ: CURL.GUI.SHAPES
直接継承しているサブクラス: ShapeBox

Shape 階層のルートにすることができるオブジェクトを表す抽象クラス。

説明

ShapeRoot は、グラフィカル階層内の Shape 階層にアンカーを設定するオブジェクトです。ShapeRoot オブジェクトは Box にする必要があります。それは、このオブジェクトには GraphicShape に含まれる子 Graphic を格納する必要があるからです。ShapeRootBox に簡単にキャストできる、ShapeRoot.as-Box という便利なメソッドがあります。

注意事項

ShapeBox および Canvas は、ShapeRoot の標準実装で、ほとんどすべてのアプリケーションにて使用できます。ほとんどのユーザーは ShapeRoot と直接対話する必要はありません。一般的なアプリケーションに役立つ ShapeRoot メソッドはありません。

コンストラクタ
clone-appearance-from:新規オブジェクトを生成するためのコンストラクタ。
コンストラクタ protected {ShapeRoot.clone-appearance-from
other:ShapeRoot,
fixup:#{proc-type {Visual, Visual}:Visual}
}
default:新しい ShapeRoot オブジェクトを作成します。
コンストラクタ public {ShapeRoot.default}

プロパティ
as-Box:Box にキャストされたこの ShapeRoot です。
アクセサ public abstract ShapeRoot.as-Box:Box
as-ShapeRoot:ShapeRoot オブジェクトとして self を返すか、ShapeRoot でない場合は null を返します。
アクセサ public final ShapeRoot.as-ShapeRoot:#ShapeRoot
プロパティ 継承 ShapeContainerBase: as-Shape, selection-context, shape-children
プロパティ 継承 Visual: _style-element, clonable-class?, completely-clonable-children?, cursor, data-source, display-context, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, possibly-displayed?, style-class, style-element, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data, visual-parent
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-parent, option-register-proc, options-present-here, registered-option-keys

メソッド
add-shape-graphic-child:shape に含まれる Graphic をこの ShapeRoot のグラフィカル階層に追加します。
public abstract {ShapeRoot.add-shape-graphic-child}:ShapeLayout
get-current-draw-transformation:最後に実行された描画中にレンダラーに適用された変換を取得します。
public abstract {ShapeRoot.get-current-draw-transformation
}:Transformation2d
invalidate-shape-layout:Shape のレイアウトに関するキャッシュされた情報を無効にします。
public abstract {ShapeRoot.invalidate-shape-layout}:void
メソッド 継承 ShapeContainerBase: add, clear, clone-children, constrain-shape-layout-bounds, draw-shape-child, draw-shape-children, get-all-children-at-point, get-child-at-point, get-leaf-at-point, get-shape-bounds, get-shape-bounds-in-shape-root, get-shape-layout-bounds, get-shape-root, note-attached, note-detaching, notify-option-children, on-drag-enter, on-pointer-enter, on-pointer-envelope-event, register-options, remove, set-shape-index, set-shape-index-after, set-shape-index-before, shape-container-fire-inferior-crossing-event, shape-container-handle-crossing, shape-container-pick-child, shape-container-pointer-enter-occurred, shape-container-pointer-leave-occurred
メソッド 継承 Visual: add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, clone-appearance-helper, find-graphical-ancestor, find-test-children, get-focus-manager, get-graphical-root, get-gui-path, get-gui-path-to-child, get-layout-context, get-origin-in-graphical-ancestor, get-origin-in-root, get-test-parent, get-test-property, get-text, get-top-left-in-ancestor, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-caret-position, on-drag-leave, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-draw, request-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates, xy-offset-to
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-inspection, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-change-notify, option-changed, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
clone-appearance-from (コンストラクタ)
protected {ShapeRoot.clone-appearance-from
other:ShapeRoot,
fixup:#{proc-type {Visual, Visual}:Visual}
}

新規オブジェクトを生成するためのコンストラクタ。

other: クローンする ShapeRoot
fixup:
各クローンを作成するために呼び出されるプロシージャ。クローン化する時に使用され ShapeRoot.clone-children に渡されます。
このプロシージャは二つの引数と共に呼び出されます。元のオブジェクトと clone-appearance のメカニズムによって生成されたコピーオブジェクトです。このプロシージャによって返された値はクローンとして使用されます。このプロシージャはコピーするオブジェクトに修正を加えて返すことができます。このプロシージャが null を返すことはできません。

説明

クローン化をサポートする ShapeRoot のサブクラスはこのコンストラクタを呼び出すコンストラクタを持たなければなりません。クローンされた子に追加しなければならない情報があるかどうか分からない場合、このコンストラクタはサブクラスの子のクローンを作成しません。このクラスのサブクラスは子のクローンを作成しそれらを追加する必要があります。追加の情報が必要でない場合、単に ShapeRoot.clone-children を呼び出すだけです。そうでない場合は、ShapeRoot.clone-children をオーバーライドしそれを呼び出さなければなりません。通常、clone-apperance-from コンストラクタから呼び出される ShapeRoot.clone-children は以下のようになります。
{if {type-of self} == {compile-time-type-of self} then
    {self.clone-children other, fixup}
}


default (コンストラクタ)
public {ShapeRoot.default}

新しい ShapeRoot オブジェクトを作成します。




プロパティ詳細
as-Box (アクセサ)
アクセサ public abstract ShapeRoot.as-Box:Box

Box にキャストされたこの ShapeRoot です。



as-ShapeRoot (アクセサ)
アクセサ public final ShapeRoot.as-ShapeRoot:#ShapeRoot

ShapeRoot オブジェクトとして self を返すか、ShapeRoot でない場合は null を返します。

注意事項

Canvas は、ShapeRoot オブジェクトの主な例です。





メソッド詳細
add-shape-graphic-child (メソッド)
public abstract {ShapeRoot.add-shape-graphic-child}:ShapeLayout

shape に含まれる Graphic をこの ShapeRoot のグラフィカル階層に追加します。

説明

このメソッドは GraphicShape の実装から排他的に呼び出されることを想定しています。このメソッドを呼び出す必要はありません。


get-current-draw-transformation (メソッド)
public abstract {ShapeRoot.get-current-draw-transformation
}:Transformation2d

最後に実行された描画中にレンダラーに適用された変換を取得します。

説明

ShapeRoot の座標空間からグローバルなレンダリング座標空間への変換です。つまり、この ShapeRoot に対して最後に Graphic.draw を呼び出したときの Renderer2d.get-transformation の値です。
この値は、一般的にはビルボードなどの操作に使用されます。ビルボードの説明については、GraphicShape を参照してください。


invalidate-shape-layout (メソッド)
public abstract {ShapeRoot.invalidate-shape-layout}:void

Shape のレイアウトに関するキャッシュされた情報を無効にします。

説明

このメソッドは、Shape がこの ShapeRoot の階層に対して追加または削除されるたびに呼び出されます。また、Shape の変換が変更される場合にも呼び出されます。