DiscreteGraphicSelectionContext (クラス)
public abstract DiscreteGraphicSelectionContext {inherits DiscreteSelectionContext, ContainerDragScroller}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.SHAPES.
直接継承しているサブクラス: DiscreteGraphicSelectionFrame

ShapeGraphic のデスクトップのような個別選択の標準 SelectionContext

説明

このコンテキストでは、その内部に入っているオブジェクトに関連付けられている GraphicSelectable または ShapeSelectable をユーザーが選択できます。

このクラスは、標準のクリック選択だけでなく、四角形のフレームをドラッグアウトする選択もサポートしています。また、標準の選択モードの他に、付加選択 (Ctrl キーを押した選択) もサポートしています。

使用するには、Box に組み込みます。

注意事項

DiscreteGraphicSelectionFrame は、直接使用可能なこのクラスの実装です。

コンストラクタ
default:新しい DiscreteGraphicSelectionContext を作成します。
コンストラクタ public {DiscreteGraphicSelectionContext.default
draw-style:GraphicSelectableDrawStyle = GraphicSelectableDrawStyle.invert,
selection-rectangle-enabled?:bool = true,
multiple-selection-enabled?:bool = true
}

プロパティ
container:この SelectionContext が適用される Graphic
アクセサ public DiscreteGraphicSelectionContext.container:Graphic
draw-style:選択された Graphic または Shape をどのように描画するかを指定します。
フィールド public DiscreteGraphicSelectionContext.draw-style:GraphicSelectableDrawStyle =GraphicSelectableDrawStyle.invert
selection-rectangle-enabled?:ドラッグ操作で複数選択用の四角形を作成するかどうかを示します。
フィールド public DiscreteGraphicSelectionContext.selection-rectangle-enabled?:bool =true
プロパティ 継承 DiscreteSelectionContext: multiple-selection-enabled?, selection
プロパティ 継承 ContainerDragScroller: ctrl-mode?, dragscrolling?, inner-scroll-buffer
プロパティ 継承 SelectionContext: can-redo?, can-undo?, selection-context-active?
プロパティ 継承 CommandContext: commands
プロパティ 継承 EventTarget: event-handlers

メソッド
create-command:時間をかけてコマンドを作成します。
public {DiscreteGraphicSelectionContext.create-command
name:String
}:#Command
internal-fire-event-at-selectable:Selectable をターゲットとする SelectionEvent を発生させます。
protected {DiscreteGraphicSelectionContext.internal-fire-event-at-selectable}:void
note-dragscroll-continued:ドラッグスクロール動作が続いていることを記録します。
public {DiscreteGraphicSelectionContext.note-dragscroll-continued}:void
note-dragscroll-ended:ドラッグスクロール動作が終了したことを記録します。
public {DiscreteGraphicSelectionContext.note-dragscroll-ended}:void
note-dragscroll-started:ドラッグスクロール動作が開始されたことを記録します。
public {DiscreteGraphicSelectionContext.note-dragscroll-started}:void
on-drag-started:DragStarted イベントのスタティック イベント ハンドラ
public {DiscreteGraphicSelectionContext.on-drag-started}:void
on-pointer-press:PointerPress イベントのスタティック イベント ハンドラ
public {DiscreteGraphicSelectionContext.on-pointer-press}:void
on-pointer-release:PointerRelease イベントのスタティック イベント ハンドラ
public {DiscreteGraphicSelectionContext.on-pointer-release}:void
overdraw-selection:この選択コンテキストに存在する g の上に、選択アフォーダンスを描画します。
public {DiscreteGraphicSelectionContext.overdraw-selection}:void
overdraw-shape-selection:この選択コンテキストに存在する s の上での描画選択のアフォーダンス。
public {DiscreteGraphicSelectionContext.overdraw-shape-selection
shape:Shape,
selectable:ShapeSelectable,
gc:Renderer2d
}:bool
select-all:このコンテキスト内のすべての Selectable を選択します。
public {DiscreteGraphicSelectionContext.select-all}:void
メソッド 継承 DiscreteSelectionContext: deselect, note-selection-context-activated, note-selection-context-deactivated, select, select-nothing, swap-selection
メソッド 継承 ContainerDragScroller: on-grab-release, on-pointer-motion, start-dragscroll
メソッド 継承 SelectionContext: on-selection-changed, redo, selection-context-request-activate, undo
メソッド 継承 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-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-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-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, 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
メソッド 継承 CommandContext: add-command, command-enabled?, command-supported?, do-command, get-command, request-update-commands
メソッド 継承 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 {DiscreteGraphicSelectionContext.default
draw-style:GraphicSelectableDrawStyle = GraphicSelectableDrawStyle.invert,
selection-rectangle-enabled?:bool = true,
multiple-selection-enabled?:bool = true
}

新しい DiscreteGraphicSelectionContext を作成します。

draw-style: 選択した項目の表示に使用されるスタイルを示す GraphicSelectableDrawStyle。選択したアイテムをカスタムの方法で表示するには、GraphicSelectableDrawStyle.none を指定し、GraphicSelectableShapeSelectableのイベント ハンドラを提供します。
selection-rectangle-enabled?: このコンテキストで、選択された四角形のドラッグアウトによる選択をサポートする必要があるかどうかを示します。
multiple-selection-enabled?: このコンテキストが複数アイテムの選択をサポートするかどうかを指定します。



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

この SelectionContext が適用される Graphic

説明

ネストされた SelectionContext のメンバではない、この Graphic の内容 (グラフィカルな子を含む) は、いずれもオブジェクトによる選択候補になります。


draw-style (フィールド)
public DiscreteGraphicSelectionContext.draw-style:GraphicSelectableDrawStyle =GraphicSelectableDrawStyle.invert

選択された Graphic または Shape をどのように描画するかを指定します。

説明

選択したアイテムは、既定により、GraphicSelectableDrawStyle によって指定される複数の方法で描画できます。なお、ユーザーは、イベント ハンドラを GraphicSelectable または ShapeSelectable の個別のインスタンスに追加することによって、Graphic が選択/選択解除されたときにそのプロパティ (背景) も変更できます。


selection-rectangle-enabled? (フィールド)
public DiscreteGraphicSelectionContext.selection-rectangle-enabled?:bool =true

ドラッグ操作で複数選択用の四角形を作成するかどうかを示します。






メソッド詳細
create-command (メソッド)
public {DiscreteGraphicSelectionContext.create-command
name:String
}:#Command

時間をかけてコマンドを作成します。

説明

通常は直接呼び出されません。代わりに、CommandContext.get-command を呼び出すことを検討してください。

オーバーライド

要求されたときにこの CommandContext で動的にインスタンス化する必要があるコマンドの場合は、このメソッドをオーバーライドします。スーパークラスから動的に作成されたコマンドも同様に継承したい場合は、必ずこのメソッドのスーパークラスの実装も呼び出してください。

なお、コマンドは、クラスのコンストラクタでメソッド CommandContext.add-command を呼び出して指定することもできます。パフォーマンスの理由と、サブクラスでコマンドをオーバーライドできるようにするために、このメソッドを代わりに使用することを推奨します。


internal-fire-event-at-selectable (メソッド)
protected {DiscreteGraphicSelectionContext.internal-fire-event-at-selectable}:void

Selectable をターゲットとする SelectionEvent を発生させます。

オーバーライド

これらのイベントを発生させる前または後に処理を追加したい場合は、サブクラスでこのメソッドをオーバーライドします。


note-dragscroll-continued (メソッド)
public {DiscreteGraphicSelectionContext.note-dragscroll-continued}:void

ドラッグスクロール動作が続いていることを記録します。

x: 操作が連続して行われる、水平位置です。
y: 操作が続いている垂直のポイントです。

説明

このメソッドは、マウスが移動するときに呼び出されます。または、自動スクロールのタイマーが開始された場合は、それが発生する定期間隔で呼び出されます。


note-dragscroll-ended (メソッド)
public {DiscreteGraphicSelectionContext.note-dragscroll-ended}:void

ドラッグスクロール動作が終了したことを記録します。



note-dragscroll-started (メソッド)
public {DiscreteGraphicSelectionContext.note-dragscroll-started}:void

ドラッグスクロール動作が開始されたことを記録します。

x: 操作が開始される、水平位置です。
y: 操作が開始された垂直のポイントです。


on-drag-started (メソッド)
public {DiscreteGraphicSelectionContext.on-drag-started}:void

DragStarted イベントのスタティック イベント ハンドラ

説明

スタティック イベント ハンドラの一般的な情報については、GuiEventTarget.on-pointer-event を参照してください。


on-pointer-press (メソッド)
public {DiscreteGraphicSelectionContext.on-pointer-press}:void

PointerPress イベントのスタティック イベント ハンドラ

説明

スタティック イベント ハンドラの一般的な情報については、GuiEventTarget.on-pointer-event を参照してください。


on-pointer-release (メソッド)
public {DiscreteGraphicSelectionContext.on-pointer-release}:void

PointerRelease イベントのスタティック イベント ハンドラ

説明

スタティック イベント ハンドラの一般的な情報については、GuiEventTarget.on-pointer-event を参照してください。


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

この選択コンテキストに存在する g の上に、選択アフォーダンスを描画します。

説明

このメソッドは、Curl の描画メカニズムにより呼び出されます。通常は、直接呼び出す必要はありません。

オーバーライド

このメソッドの実装では、gc で設定された clipping-rectangle が gセル境界になるように設定される必要があることに注意してください。これにより、SelectionContextg's のボーダーとマージン、ならびに g の境界の上に選択アフォーダンスを描画できるようになります。このメソッドの実装では、特に g で関連する描画メソッドを呼び出す前に、さらにクリップを実行する方が適した場合があります。


overdraw-shape-selection (メソッド)
public {DiscreteGraphicSelectionContext.overdraw-shape-selection
shape:Shape,
selectable:ShapeSelectable,
gc:Renderer2d
}:bool

この選択コンテキストに存在する s の上での描画選択のアフォーダンス。

戻り値

Shape が選択されたかどうかを示すboolShape が選択されたため上書きされた場合は true になります。

説明

このメソッドは、Curl の描画メカニズムにより呼び出されます。通常は、直接呼び出す必要はありません。

注意事項

このメソッドは、Graphic オブジェクトではなく Shape オブジェクトを処理する点を除けば、DiscreteGraphicSelectionContext.overdraw-selection とよく似ています。また、shapeselectable.shape に対応しない場合があるので注意してください。selectable は、実際には shape のいずれかの祖先に属する ShapeSelectable である場合があります。


select-all (メソッド)
public {DiscreteGraphicSelectionContext.select-all}:void

このコンテキスト内のすべての Selectable を選択します。

説明

DiscreteSelectionContext.multiple-selection-enabled? が false の場合、このメソッドを呼び出すとエラーになります。