(クラス)
テキスト コントロールの UI オブジェクトにおける共通の基本クラスです。
オーバーライド
このクラスは、サブクラスで重複する可能性のある多くのコードをカプセル化します。意味的には重要ではありません。エンド ユーザーがオーバーライドすることを意図していません。
導入:
バージョン 6.0
コンストラクタ public | {BaseTextControlUI-of.default} |
非ローカル オプション public BaseTextControlUI-of.control-color:
FillPattern
フィールド protected constant BaseTextControlUI-of.string-graphic:tStringGraphic
プロパティ 継承 ControlUI:
color, control, control-appearance-changeable?, control-content-background, copy-options, focus-skin, font-family, font-style, font-weight, skin, text-breakable?, text-line-through?, text-preserve-whitespace?, text-underline? プロパティ 継承 Graphic:
avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, discrete-select-in-range?, display-context, enabled?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visible?, visual-parent, vorigin, width プロパティ 継承 Visual:
_style-element, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
public | {BaseTextControlUI-of.attempt-revalidate-layout}:bool |
protected abstract | {BaseTextControlUI-of.create-contents}:Visual |
protected abstract | {BaseTextControlUI-of.create-string-graphic }:tStringGraphic |
draw: | このオブジェクトの可視表現を描画します。 |
public | {BaseTextControlUI-of.get-caret-index-for-position}:(index:int, bias-backwards?:bool) |
public | {BaseTextControlUI-of.get-position-for-caret-index index:int,bias-backwards?:bool = false }:(x:Distance, y:Distance) |
protected abstract | {BaseTextControlUI-of.get-value-display-string }:tValue |
public | {BaseTextControlUI-of.handle-reconversion-request }:(value:String, handled?:bool) |
public | {BaseTextControlUI-of.note-dragscroll-continued}:void |
public | {BaseTextControlUI-of.on-composition-change-event}:void |
public | {BaseTextControlUI-of.on-end-composition-event}:void |
public | {BaseTextControlUI-of.on-focus-in e:FocusIn}:void |
public | {BaseTextControlUI-of.on-start-composition-event}:void |
public | {BaseTextControlUI-of.react-to-state-change}:void |
protected | {BaseTextControlUI-of.reset-caret-alarm}:void |
public | {BaseTextControlUI-of.set-size}:void |
public | {BaseTextControlUI-of.start-caret-alarm}:void |
public | {BaseTextControlUI-of.stop-caret-alarm}:void |
メソッド 継承 GuiEventTarget:
handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-result-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-focus-event, 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-key-event, on-pointer-button, on-pointer-crossing, on-pointer-event, 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-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class メソッド 継承 BaseFrame:
add-internal, after-reposition, allocate-layout-object, before-reposition, compute-child-bounds, compute-parent-elastic, constrain-height, constrain-width, end-pagination, get-height-preference, get-text, get-width-preference, install-child-bounds, internal-remove-child, note-attached, note-detaching, notify-option-children, paginate, pick-child, propagate-request-layout, register-options メソッド 継承 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-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 メソッド 継承 Box:
clear, compare-children, find-test-children, get-delimited-child-text-selection, get-gui-path-to-child, get-range-as-selected-text, get-visible-rect-in-root-into, graphical-child-visible-at, make-gui-mark, search-next-here, search-prev-here メソッド 継承 Graphic:
create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-top-left-in-ancestor, get-visible-bounds-into, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paint-with-decorations, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, set-layout, start-pagination, xy-offset-to メソッド 継承 Visual:
add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, get-focus-manager, get-layout-context, get-test-parent, get-test-property, 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-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
(コンストラクタ)
public | {BaseTextControlUI-of.default} |
このオブジェクトを作成します。
導入:
バージョン 6.0
(非ローカル オプション)
このオプションで、コントロールのボタン部分の主な色を設定します。
説明
例
例 |
|
{def samples =
{HBox valign="bottom", spacing = 4pt,
control-appearance-changeable? = true,
control-color = "cornflowerblue",
{CommandButton label = "Sample Button"},
{CheckButton label = "Sample"},
{Scrollbar width = .8in, direction = "horizontal"},
{ComboBox width = 1.2in, prompt = "Choose One",
"First", "Second", "Third"
},
{TextField width = 1.0in, value = "Sample text"}
}
}
{install-style-sheet-on-Graphic samples, null,
look-and-feel = the-standard-look-and-feel
}
| |
(フィールド)
protected constant BaseTextControlUI-of.string-graphic:tStringGraphic
(メソッド)
public | {BaseTextControlUI-of.attempt-revalidate-layout}:bool |
最後のレイアウト ネゴシエーションが完了してから、Graphic のレイアウト設定が変更されたかどうかを判定します。
戻り値
bool。このオブジェクトのレイアウト設定が変更されていない場合は true。値が false の場合、変更の有無にかからわずレイアウト ネゴシエーションの確認が行なわれます。
注意事項
このメソッドは、完全なレイアウト ネゴシエーション、つまり、
Graphic.set-size を呼び出してネゴシエーションを行ったオブジェクトに対してのみ呼び出すことを推奨します。このメソッドが true を返すと、直前の完全なレイアウト ネゴシエーション中に行われた同じ高さおよび幅設定の確認が繰り返された場合に、オブジェクトが、以前返された答えと全く同じ答え (
OriginElastic.equal? によって計算された答え) を返すことになります。
このメソッドからオブジェクトがすぐに true を返す最も一般的なケースは、直前のレイアウト ネゴシエーションの結果を無効にするようなことがオブジェクトで発生しなかった場合です。また、このメソッドが true を返すこれ以外のケースは、
Box であるオブジェクトの場合で、
Box の子すべてに対して
Graphic.attempt-revalidate-layout を呼び出し、これらの呼び出しすべてで true が返されたときに true を返します(
Box の設定が
Box の子の設定と変更されたかどうかが不明なその他のパラメータにのみ依存する場合、この処理が有効です)。
このメソッドが true を返し、このオブジェクトの親にその境界を変更する理由がない場合、親がこのオブジェクトに対してさらにレイアウト ネゴシエーションを呼び出す可能性はありません。したがって、このオブジェクトがそのレイアウトの有効性の判定を記録している場合、このメソッドから true を返す前にオブジェクトはそれ自体を layout-valid 状態に設定する必要があります。
プログラミング注意事項
オーバーライド
(メソッド)
protected abstract | {BaseTextControlUI-of.create-contents}:Visual |
テキスト コントロールの Visual コンテンツを作成します。
説明
このクラスのデフォルト コンストラクタによって呼び出されます。
導入:
バージョン 6.0
(メソッド)
protected abstract | {BaseTextControlUI-of.create-string-graphic }:tStringGraphic |
テキスト コントロールの文字コンテンツを表示する StringGraphic を作成します。
説明
このクラスのデフォルト コンストラクタによって呼び出されます。
導入:
バージョン 6.0
オーバーライド
def type = {self.look-and-feel.get-string-graphic {type-of self}}
{if-non-null type then
{if-non-null maker = {type.get-instance-maker "default"} then ||""
{return {maker.new ""} asa StringGraphic}
}
}
|| Fallback
{return {StringGraphic ""}}
(メソッド)
このオブジェクトの可視表現を描画します。
オーバーライド
(メソッド)
挿入ポイントにキャレットを描画します。
導入:
バージョン 7.0
(メソッド)
public | {BaseTextControlUI-of.get-caret-index-for-position}:(index:int, bias-backwards?:bool) |
指定された場所 (x,y) にある挿入するポイントの文字インデックスを返します。
戻り値
返された index は、値の開始からの 0 ベースの文字のオフセットです。(x,y) の場所が、行の終わりの場合は bias-backwards? が true になります。
導入:
バージョン 6.0
(メソッド)
キャレットをレンダリングするのに使用される四角形を取得します。
index: キャレットのインデックスです。
最初の文字の直前のインデックスは、0 です。最後の文字の直後のインデックスは、{self.get-text}.size です。インデックス 1 は 1 番目の文字と 2 番目の文字の間です。
bias-backwards?: index が 2 つのグラフィック位置を参照できる場合、true であればこの値は最初の位置が使用されるべきです。そうでなければ(既定)、2 番目の位置が使用されます。
戻り値
キャレットの四角形の左、右、幅、高さです。
導入:
バージョン 7.0
(メソッド)
public | {BaseTextControlUI-of.get-position-for-caret-index index:int,bias-backwards?:bool = false }:(x:Distance, y:Distance) |
キャレット インデックスをグラフィカル位置に変換します。
index: キャレットのインデックスです。
最初の文字の直前のインデックスは、0 です。最後の文字の直後のインデックスは、{self.get-text}.size です。インデックス 1 は 1 番目の文字と 2 番目の文字の間です。
bias-backwards?: index が 2 つのグラフィック位置を参照できる場合、true であればこの値は最初の位置が使用されるべきです。そうでなければ(既定)、2 番目の位置が使用されます。
戻り値
キャレット インデックスに対応するグラフィックの位置です。
説明
インデックスが 0 の場合、一番左のグラフィック位置が返されます。そうでなければ、テキストの最初の index の文字の幅が返されます。
インデックスが 0 以下の場合や、{self.get-text}.size 以上の場合、エラーが返されます。
導入:
バージョン 7.0
(メソッド)
protected abstract | {BaseTextControlUI-of.get-value-display-string }:tValue |
表示される String を返します。
説明
導入:
バージョン 6.0
(メソッド)
キャレットの位置を提供します。
戻り値
説明
インプット メソッドがキャレットの位置をクエリする必要がよくあります。この一般的な理由は、インプット メソッド ウィンドウをキャレットに近い位置にグラフィック上で合わせるためです。
このリクエストが行われると、クライアント オブジェクトは現在のキャレットの位置を表す InputMethodCaretPosition を返します。位置が返されない場合、インプット メソッドは通常、既定の動作に戻ります (たとえば、キャレットが View の左上隅にあると想定します)。
注意事項
InputMethodCaretPosition の座標は InputMethodClient の座標系にある必要があります。
(メソッド)
public | {BaseTextControlUI-of.handle-reconversion-request }:(value:String, handled?:bool) |
再変換する String を提供します。
戻り値
リクエストが処理される場合は、String および true です。それ以外の場合は (既定)、任意の値および false です。
説明
インプット メソッドでは、シーケンスを入れ替えるために以前に入力したテキストを表示することができます。
このリクエストが行われると、クライアント オブジェクトは再変換のための String を返します。これは通常、現在選択されているコンテンツです。クライアント オブジェクトは通常、String をそのコンテンツから削除します。これは、文字列が元のコンテンツとして一度表示され、さらに再変換されたコンテンツとしてもう一度表示されるような、二重表示を避けるためです。
(メソッド)
(メソッド)
public | {BaseTextControlUI-of.note-dragscroll-continued}:void |
ドラッグスクロール動作が続いていることを記録します。
x: 操作が連続して行われる、水平位置です。
y: 操作が続いている垂直のポイントです。
説明
このメソッドは、マウスが移動するときに呼び出されます。または、自動スクロールのタイマーが開始された場合は、それが発生する定期間隔で呼び出されます。
(メソッド)
public | {BaseTextControlUI-of.on-composition-change-event}:void |
(メソッド)
public | {BaseTextControlUI-of.on-end-composition-event}:void |
(メソッド)
public | {BaseTextControlUI-of.on-focus-in e:FocusIn}:void |
FocusIn イベントのスタティック イベント ハンドラ。
説明
この実装は、親コントロールで発生させるフォーカス イベントをトリガします。
ポインタ イベントと異なり、キーボード イベントはグラフィカル コンテナ階層を自動的に増加させないため、ユーザー記述のハンドラが実行されるように、格納された
Control のハンドラを明示的に呼び出す必要があります。
(メソッド)
FocusOut イベントのスタティック イベント ハンドラ。
説明
この実装は、親コントロールで発生させるフォーカス イベントをトリガします。
ポインタ イベントと異なり、キーボード イベントはグラフィカル コンテナ階層を自動的に増加させないため、ユーザー記述のハンドラが実行されるように、格納された
Control のハンドラを明示的に呼び出す必要があります。
(メソッド)
public | {BaseTextControlUI-of.on-start-composition-event}:void |
(メソッド)
public | {BaseTextControlUI-of.react-to-state-change}:void |
コントロールの状態が変更された場合に、コントロールの外観を変更します。
オーバーライド
サブクラスは、ロールオーバー、押される、無効化、チェック、またはこれらの組み合わせなどオブジェクトの状態が変更されたときに必要な動作を実行するように、これをオーバーライドする必要があります。オブジェクトはこのクラスのすべてのオブジェクトと、
enabled? などの既存のプロパティにアクセスして、何を実行すべきかを想定します。
(メソッド)
protected | {BaseTextControlUI-of.reset-caret-alarm}:void |
点滅するキャレットのタイマーをリセットします。
説明
導入:
バージョン 6.0
(メソッド)
public | {BaseTextControlUI-of.set-size}:void |
このオブジェクトにレイアウト幅と高さを代入します。
説明
このオブジェクトで set-size を呼び出すと、オブジェクトのレイアウト サイズを代入し、オブジェクトのレイアウト ネゴシエーションを完了します。グラフィック階層のすべてのオブジェクトにレイアウト サイズが代入された後で階層のレイアウト ネゴシエーションが完了します。
bounds: このオブジェクトの境界ボックスの左右および上下の範囲をオブジェクトの起点から相対的に示す
GRect。
プログラミング注意事項
このメソッドは、オブジェクトのグラフィカルな親によって呼び出されます。
オーバーライド
(メソッド)
public | {BaseTextControlUI-of.start-caret-alarm}:void |
キャレットを明滅させ始めます。
説明
導入:
バージョン 7.0
(メソッド)
public | {BaseTextControlUI-of.stop-caret-alarm}:void |
キャレットの明滅を停止させます。
説明
導入:
バージョン 7.0