GraphicSelectable (クラス)
public GraphicSelectable {inherits Selectable}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.

DiscreteGraphicSelectionContext 内の Graphic を選択可能にする方法を提供します。

説明

このオプションを使用するには、Graphicgraphic-selectable オプションをこのクラスの新しいインスタンスに設定するだけです。

このオブジェクトは、selection-rectangle 操作とクリック操作でキャプチャされるかどうかという問いに答えて、選択された状態のグラフィックのオーバードローイングを実行します。

このオブジェクトは、Graphic.graphic-selectable オプションをこのクラスのインスタンスに設定することで、Graphic に関連付けられます。

予期されたイベント

SelectableAdded: このオブジェクトを選択に追加すると発生します。
SelectableRemoved: このオブジェクトを選択から削除すると発生します。

コンストラクタ
default:この GraphicSelectable を作成します。
コンストラクタ public {GraphicSelectable.default ...:EventHandler}

プロパティ
graphic:この GraphicSelectable に関連付けられた Graphic
アクセサ public GraphicSelectable.graphic:Graphic
visual-or-null:この Selectable. と関連した Visual
アクセサ public GraphicSelectable.visual-or-null:#Visual
プロパティ 継承 EventTarget: event-handlers

メソッド
click-captures?:1 回のクリック操作で、この GraphicSelectable をキャプチャするかどうかを確認します。
public {GraphicSelectable.click-captures? x:Distance, y:Distance}:bool
overdraw-selection:選択時にこのオブジェクトのアフォーダンスを描画します。
public {GraphicSelectable.overdraw-selection}:void
selection-rectangle-captures?:selection-rectangle がこの GraphicSelectable をキャプチャするかどうかを示します。
public {GraphicSelectable.selection-rectangle-captures?
rect:GRect
}:bool
メソッド 継承 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-enter, on-drag-leave, 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-enter, on-pointer-envelope-event, on-pointer-event, on-pointer-leave, 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
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {GraphicSelectable.default ...:EventHandler}

この GraphicSelectable を作成します。




プロパティ詳細
graphic (アクセサ)
アクセサ public GraphicSelectable.graphic:Graphic

この GraphicSelectable に関連付けられた Graphic

説明

この値は、このオブジェクトに Graphic.graphic-selectable オプションを設定した結果として、暗黙的に設定されます。この方法で初期化されていない GraphicSelectable 上でこのプロパティにアクセスすると、エラーがトリガされます。


visual-or-null (アクセサ)
アクセサ public GraphicSelectable.visual-or-null:#Visual

この Selectable. と関連した Visual






メソッド詳細
click-captures? (メソッド)
public {GraphicSelectable.click-captures? x:Distance, y:Distance}:bool

1 回のクリック操作で、この GraphicSelectable をキャプチャするかどうかを確認します。

x, y: 関連付けられたグラフィックからの相対座標で指定されたクリック位置。この位置は、必ずこのグラフィックの境界ボックス内になります。

オーバーライド

このメソッドの既定の実装では、単に true が返されます。関連付けられたグラフィックの選択可能領域を制限する GraphicSelectable が、このメソッドを適切にオーバーライドする必要があります。


overdraw-selection (メソッド)
public {GraphicSelectable.overdraw-selection}:void

選択時にこのオブジェクトのアフォーダンスを描画します。

オーバーライド

このメソッドの実装では、指定された draw-stylecolor が必ず適用され、選択コンテキスト内で選択されたアイテムすべての UI の一貫性が保たれるようにします。

また実装では、gc に設定された clipping-rectangle が、このオブジェクトに関連付けられたグラフィックのセル境界になるよう設定することも必要です。


selection-rectangle-captures? (メソッド)
public {GraphicSelectable.selection-rectangle-captures?
rect:GRect
}:bool

selection-rectangle がこの GraphicSelectable をキャプチャするかどうかを示します。

rect: 関連するグラフィックを基準にして、座標で指定する selection-rectangle。この四角形は、このグラフィックの境界ボックスと必ず交差します。

オーバーライド

このメソッドの既定の実装では、単に true が返されます。関連付けられたグラフィックの選択可能領域を制限する GraphicSelectable が、このメソッドを適切にオーバーライドする必要があります。