SelectionContext (クラス)
public abstract SelectionContext {inherits GuiEventTarget, CommandContext}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.
直接継承しているサブクラス: DiscreteSelectionContext, TextSelectionContext, TreeControl, RecordGrid

Selection のユーザー作成をサポートします。

説明

このクラスのインスタンスは、グラフィカルな子孫の選択をサポートする Graphic に関連付けることができます。現在選択されているアイテムの Selection を保持し、指定された選択モデルを実装します。また、サポートされている一連の動作 (加法クリック、囲み取り、キーボード矢印、幾何形状のテキスト範囲など) を実装することもできます

SelectionContext は、必要に応じてそれ自体で SelectionContextActivatedSelectionContextDeactivatedSelectionChanged を発生させます。他のオブジェクトは、これらのイベントをリッスンするダイナミック イベント ハンドラをこのクラスのインスタンスにアタッチできます。

このクラスは、現在の選択状態を表したり変更するためのさまざまなパブリック メソッドを公開します。この設計における重要な点は、アプリケーションは返される Selection ではなく SelectionContext を操作して変更するということです。

コンストラクタ
default:新しい SelectionContext を作成します。
コンストラクタ public {SelectionContext.default}

プロパティ
can-redo?:redo 操作が実行できるかどうかを示します。
アクセサ public SelectionContext.can-redo?:bool
can-undo?:undo 操作が実行できるかどうかを示します。
アクセサ public SelectionContext.can-undo?:bool
container:この SelectionContext が適用される Graphic
アクセサ public abstract SelectionContext.container:Graphic
selection:プロジェクトにより保持される、現在の Selection
アクセサ public abstract SelectionContext.selection:Selection
selection-context-active?:この SelectionContext がアクティブであるかどうかを示します。
アクセサ public SelectionContext.selection-context-active?:bool
プロパティ 継承 CommandContext: commands
プロパティ 継承 EventTarget: event-handlers

メソッド
create-command:時間をかけてコマンドを作成します。
public {SelectionContext.create-command name:String}:#Command
note-selection-context-activated:この SelectionContext がアクティブになっていることに注意してください。
public {SelectionContext.note-selection-context-activated}:void
note-selection-context-deactivated:この SelectionContext が非アクティブになっていることに注意してください。
public {SelectionContext.note-selection-context-deactivated}:void
on-selection-changed:SelectionChanged イベントのスタティック イベント ハンドラ
public {SelectionContext.on-selection-changed ev:SelectionChanged}:void
overdraw-selection:この選択コンテキストに存在する g の上に、選択アフォーダンスを描画します。
public {SelectionContext.overdraw-selection}:void
redo:SelectionContextで最も最近発生した undo 操作の効果を元に戻します。
public {SelectionContext.redo}:void
select-nothing:このコンテキストの選択をクリアします。
public abstract {SelectionContext.select-nothing}:void
selection-context-request-activate:この SelectionContext がアクティブになるよう要求します。
public {SelectionContext.selection-context-request-activate}:bool
undo:SelectionContextで最も最近発生した操作の効果を元に戻します。
public {SelectionContext.undo}:void
メソッド 継承 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-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 {SelectionContext.default}

新しい SelectionContext を作成します。




プロパティ詳細
can-redo? (アクセサ)
アクセサ public SelectionContext.can-redo?:bool

redo 操作が実行できるかどうかを示します。

導入: バージョン 6.0


can-undo? (アクセサ)
アクセサ public SelectionContext.can-undo?:bool

undo 操作が実行できるかどうかを示します。

導入: バージョン 6.0


container (アクセサ)
アクセサ public abstract SelectionContext.container:Graphic

この SelectionContext が適用される Graphic

説明

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


selection (アクセサ)
アクセサ public abstract SelectionContext.selection:Selection

プロジェクトにより保持される、現在の Selection



selection-context-active? (アクセサ)
アクセサ public SelectionContext.selection-context-active?:bool

この SelectionContext がアクティブであるかどうかを示します。






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

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

説明

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

オーバーライド

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

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


note-selection-context-activated (メソッド)
public {SelectionContext.note-selection-context-activated}:void

この SelectionContext がアクティブになっていることに注意してください。

オーバーライド

このメソッドをオーバーライドするサブクラスは、必ずスーパークラスの実装を呼び出す必要があります。


note-selection-context-deactivated (メソッド)
public {SelectionContext.note-selection-context-deactivated}:void

この SelectionContext が非アクティブになっていることに注意してください。

オーバーライド

このメソッドをオーバーライドするサブクラスは、必ずスーパークラスの実装を呼び出す必要があります。


on-selection-changed (メソッド)
public {SelectionContext.on-selection-changed ev:SelectionChanged}:void

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

説明

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


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

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

説明

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

オーバーライド

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


redo (メソッド)
public {SelectionContext.redo}:void

SelectionContextで最も最近発生した undo 操作の効果を元に戻します。

導入: バージョン 6.0


select-nothing (メソッド)
public abstract {SelectionContext.select-nothing}:void

このコンテキストの選択をクリアします。



selection-context-request-activate (メソッド)
public {SelectionContext.selection-context-request-activate}:bool

この SelectionContext がアクティブになるよう要求します。

戻り値

要求が正常に受け入れられた場合は、true。それ以外は false


undo (メソッド)
public {SelectionContext.undo}:void

SelectionContextで最も最近発生した操作の効果を元に戻します。

導入: バージョン 6.0