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

編集可能なテキストの TextSelectionContext です。

説明

WritableTextSelectionContext には、編集可能なテキストでの操作が含まれます。特に:


プロパティ
writable?:選択コンテキストのテキストが、現在編集可能であるかどうかを示します。
アクセサ public WritableTextSelectionContext.writable?:bool
プロパティ 継承 TextSelectionContext: selection
プロパティ 継承 SelectionContext: can-redo?, can-undo?, container, selection-context-active?
プロパティ 継承 CommandContext: commands
プロパティ 継承 EventTarget: event-handlers

メソッド
create-command:時間をかけてコマンドを作成します。
public {WritableTextSelectionContext.create-command
name:String
}:#Command
delete-selection:現在の選択の内容を削除します。
public abstract {WritableTextSelectionContext.delete-selection}:void
replace-selection-with-string:現在の選択の内容を text で置き換えます。
public abstract {WritableTextSelectionContext.replace-selection-with-string}:void
メソッド 継承 TextSelectionContext: select-all
メソッド 継承 SelectionContext: note-selection-context-activated, note-selection-context-deactivated, on-selection-changed, overdraw-selection, redo, select-nothing, 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-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




プロパティ詳細
writable? (アクセサ)
アクセサ public WritableTextSelectionContext.writable?:bool

選択コンテキストのテキストが、現在編集可能であるかどうかを示します。

説明

WritableTextSelectionContext は、常に編集をサポートする必要はありません。たとえば、テキスト エントリ フィールドは、ダイナミックに設定できる、「読み取り専用」モードをサポートします。

既定値は常に true です。

オーバーライド

この上位オブジェクトをオーバーライドするクラスは、この値が変更されるたびに、必ず request-update-commands を呼び出さなくてはなりません。





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

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

説明

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

オーバーライド

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

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


delete-selection (メソッド)
public abstract {WritableTextSelectionContext.delete-selection}:void

現在の選択の内容を削除します。

説明

選択が空でない場合、選択の内容は削除されます。選択が空の場合、このメソッドは何ら影響を与えません。いずれの場合も、結果の選択は空になりますが、有効なロケーションを持ちます。


replace-selection-with-string (メソッド)
public abstract {WritableTextSelectionContext.replace-selection-with-string}:void

現在の選択の内容を text で置き換えます。

text: 現在の選択の置き換えに使用されるテキストの StringInterface です。

説明

選択が空でない場合、選択の内容は削除され、その場所に text が挿入されます。選択は空であるが、有効なロケーションにある場合 (例:これが編集可能なテキスト コントロールの点滅キャレットを表す場合)、空の選択のロケーションに text が挿入されます。いずれの場合も、挿入されるテキストは、操作が完了してから選択されます。

選択が、有効なロケーションを持たない場合、エラーが発生します。