BaseTextAreaScrollBox (クラス)
public BaseTextAreaScrollBox {inherits FontGraphicMixin, ScrollBox}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.CONTROL-UI-GENERIC.

TextArea で使用される ScrollBox のサブクラスです。

導入: バージョン 6.0

コンストラクタ
default:このオブジェクトを作成します。
コンストラクタ public {BaseTextAreaScrollBox.default
viewport-class:Type = Viewport,
...
}

プロパティ
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public BaseTextAreaScrollBox.display-context:#DisplayContext
font-family:テキストのフォント書体を設定します。
非ローカル オプション public BaseTextAreaScrollBox.font-family:String
font-size:オブジェクト内のテキストの既定サイズを指定します。
非ローカル オプション public BaseTextAreaScrollBox.font-size:any
font-style:オブジェクト内のテキストを斜体や斜投影法などのフォントにするかどうかを指定します。
非ローカル オプション public BaseTextAreaScrollBox.font-style:FontStyle
font-weight:オブジェクト内のテキストを、太字として強調表示するかどうかを指定します。
非ローカル オプション public BaseTextAreaScrollBox.font-weight:FontWeight
visible-lines:完全に見える BaseTextAreaScrollBox 内の行数です。
アクセサ public BaseTextAreaScrollBox.visible-lines:int
プロパティ 継承 ScrollBox: accept-focus?, always-disable-hscroll?, always-disable-vscroll?, expanded-hscroll-bounds?, expanded-vscroll-bounds?, focus-manager, have-hscroll?, have-vscroll?, hblocksize, horizontal-position, hscroll-quantized?, hscroll?, hunitsize, max-horizontal-position, max-vertical-position, min-horizontal-position, min-vertical-position, reserve-corner?, shrink-hscroll?, shrink-vscroll?, style-element, take-focus?, vblocksize, vertical-position, vscroll-quantized?, vscroll?, vunitsize
プロパティ 継承 FontVisualMixin: cached-display-context, color, font, text-line-through?, text-underline?
プロパティ 継承 ViewportBox: child-height, child-width, device-pixel-size, hstretch?, viewport, vstretch?
プロパティ 継承 Frame: clonable-class?, halign, halign-spec, hstretch?-spec, valign, valign-spec, vstretch?-spec
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 BaseFrame: child, completely-clonable-children?, graphical-children, ordered-children, reverse-ordered-children, width-first?
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 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?, 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, 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
プロパティ 継承 EventTarget: event-handlers

メソッド
constrain-width:指定した高さの制約を受けた場合にこの Graphic の高さ設定を返します。
public {BaseTextAreaScrollBox.constrain-width
lc:LayoutContext,
ascent:Distance,
descent:Distance
}:Dimension
get-height-preference:この Graphic の高さ設定を返します。
public {BaseTextAreaScrollBox.get-height-preference}:Dimension
set-viewport-y:この ViewportBoxViewport の垂直オフセットを、指定されたように設定します。
protected {BaseTextAreaScrollBox.set-viewport-y v:Distance}:void
メソッド 継承 FontGraphicMixin: react-to-font-option-change
メソッド 継承 ScrollBox: constrain-height, create-hscroll, create-main-panel, create-vscroll, descendant-suggests-key-focus-request, end-pagination, get-hscroll, get-vscroll, get-width-preference, make-gui-mark, on-drag-over, on-gesture-begin, on-gesture-end, on-gesture-pan, on-key-press, on-pointer-press, on-pointer-scroll, paginate, scroll-to, scroll-to-include-relative-point, scroll-to-object, set-scroll-sizes, set-size
メソッド 継承 FontVisualMixin: calculate-pointsize, font-option-changed, get-display-context, invalidate-font, update-font-metrics, validate-font
メソッド 継承 ViewportBox: add, add-adornment, clear, get-viewport-bounds, remove-child, set-viewport-x
メソッド 継承 GraphicOptions: any-to-Distance
メソッド 継承 Frame: clone-appearance-helper
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 BaseFrame: add-internal, after-reposition, allocate-layout-object, attempt-revalidate-layout, before-reposition, compute-child-bounds, compute-parent-elastic, draw, get-text, install-child-bounds, internal-remove-child, note-attached, note-detaching, notify-option-children, 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
メソッド 継承 BasicBox: contains-point?, find-graphic-at, handle-crossing, on-pointer-envelope-event, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 Box: 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, 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
メソッド 継承 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-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-magnify, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-release, 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 {BaseTextAreaScrollBox.default
viewport-class:Type = Viewport,
...
}

このオブジェクトを作成します。

説明

詳細情報に関しては、ScrollBox.default を参照してください。
導入: バージョン 6.0



プロパティ詳細
display-context (非ローカル オプション)
public BaseTextAreaScrollBox.display-context:#DisplayContext

このオブジェクトに関連付けられている DisplayContext

プログラミング注意事項

このオプションは、Curl グラフィック システム内での通信のために使用されます。これは、ユーザー コードで不用意に設定や設定解除を行わないでください。また、通常は、ユーザー コードで直接読み取るべきではありません。現在の DisplayContext が必要な場合は、Visual.get-display-context を呼び出すことによりフェッチしてください。

画面上のウィンドウまたは印刷されたページで表示可能なすべてのグラフィック階層は、そのルートにおいて、display-context オプションを DisplayContext オブジェクトに設定するオブジェクトを持つ必要があります。このオブジェクトは、グラフィック階層の表示に使用される表示媒体に適しています。つまり、オブジェクトは、display-context オプションの値が null から非 null DisplayContext オブジェクトに変更されるのをモニタリングすることにより、表示不可能なグラフィック階層に連結されていることを認識します。したがって、特定の動作を実行する必要のある Visual のサブクラスは、表示不可能なグラフィック階層に接続された場合、次のようなオプション宣言を含むことにより display-context オプションをモニタリングします。

{nonlocal-option public display-context:#DisplayContext
change handler}


ここで、change handler 内のコードは display-context オプションの現在値 (変数 display-context の値として、変更ハンドラ内にある) を取得し、null および非 null の値の間で行われる変更をモニタリングし、必要とされる動作を実行します。

ただし、このプログラミング熟語を使用するプログラマーは、グラフィカル表示を再配列する際、グラフィック階層からグラフィカル オブジェクトを一時的に分離し、これらを同じ階層に再アタッチすることが、割に一般的であることを理解するべきです。この処理により、一時的に分離されたオブジェクトは、display-context オブジェクトが null になり、再び非 null になるのを観察します。display-context オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。


font-family (非ローカル オプション)
public BaseTextAreaScrollBox.font-family:String

テキストのフォント書体を設定します。

説明

テキストをレンダリングするフォントの検索に使用するフォント ファミリー名 (または名前のリスト) を指定します。
フォントの指定方法の詳細については、Font を参照してください。

{VBox
    {text font-family = "serif", serif},
    {text font-family = "sans-serif", sans-serif},
    {text font-family = "monospace", monospace},
    {text
        font-family = "Arial, Nimbus Sans L, sans-serif",
        prefer a particular sans-serif
    },
    {text
        font-family =
            "Times New Roman, Nimbus Roman No9 L, serif",
        prefer a particular serif
    }
}


font-size (非ローカル オプション)
public BaseTextAreaScrollBox.font-size:any

オブジェクト内のテキストの既定サイズを指定します。

説明

この値の妥当なタイプは DistancePixelDistanceEmDistance を含んでいます。許可されたタイプを判断するための詳細な情報については verify-any-is-distance-type を御覧下さい。
値は正の値でなければなりません。負の値や、0 はオプションをに設定することはできますが、実行する際にランタイムエラーが発生します。

font-size オプションを使用したテキスト サイズの指定方法の例をいくつか示します。"Medium" という語を持つテキスト オブジェクトが、それを含むテキスト オブジェクトから、どのようにフォント サイズを取得するかに注意してください。


{text font-size=12pt,
    {text font-size=8pt, Little}
    {text font-size=1cm, Pretty big}
    {text Medium}
    {text font-size=1in, Huge!}
}
{text And this is the default}

参照:

文字書式: tiny, small, big, huge


font-style (非ローカル オプション)
public BaseTextAreaScrollBox.font-style:FontStyle

オブジェクト内のテキストを斜体や斜投影法などのフォントにするかどうかを指定します。

説明

適切な値は次のとおりです。

このオプションは、非ローカル オプション ControlFrame.control-appearance-changeable? がコントロール上で true の場合、コントロール内のテキストの外観に反映されます。DialogMenuPane MenuBarDialog.use-look-and-feel? が true の場合、フォント書体は外観で指定された値に設定されるため、ダイアログやメニューで値を設定しても効果はありません。


{paragraph font-style="italic", Everything in this paragraph
    should be in an italic font,
    {text font-style="normal", except for this text fragment.}
}

参照:

文字書式: italic


font-weight (非ローカル オプション)
public BaseTextAreaScrollBox.font-weight:FontWeight

オブジェクト内のテキストを、太字として強調表示するかどうかを指定します。

説明

適切な値は次のとおりです。

このオプションは、非ローカル オプション ControlFrame.control-appearance-changeable? がコントロール上で true の場合、コントロール内のテキストの外観に反映されます。DialogMenuPane MenuBarDialog.use-look-and-feel? が true の場合、フォント スタイルは外観で指定された値に設定されるため、ダイアログやメニューで値を設定しても効果はありません。


{paragraph Everything in this paragraph
    should be normally weighted,
    {text font-weight="bold", except for this text fragment.}
}

参照:

文字書式: bold


visible-lines (アクセサ)
アクセサ public BaseTextAreaScrollBox.visible-lines:int

完全に見える BaseTextAreaScrollBox 内の行数です。

注意事項

box の高さが行数と全く同じでない場合、一番下に一行部分的に見える可能性がありますが、この行はカウントされません。
導入: バージョン 6.0





メソッド詳細
constrain-width (メソッド)
public {BaseTextAreaScrollBox.constrain-width
lc:LayoutContext,
ascent:Distance,
descent:Distance
}:Dimension

指定した高さの制約を受けた場合にこの Graphic の高さ設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext
lextent, rextent: 幅の制約。起点からの左と右の相対距離で表されます。

戻り値

オブジェクトの高さ設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

既定のメソッド Graphic.constrain-width は、単に Graphic.get-height-preference を呼び出します。このメソッドは、オブジェクトが高さ設定を計算する際に幅制約を考慮しなくてもいい場合はオーバーライドする必要がありません。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な垂直軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。

重要:このメソッドのオーバーライド実装には、レイアウト ネゴシエーションが確実にグラフィック階層全体に適用されるように、スーパークラス実装の呼び出しを含める必要があります。


get-height-preference (メソッド)
public {BaseTextAreaScrollBox.get-height-preference}:Dimension

この Graphic の高さ設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext

戻り値

オブジェクトの高さ設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

このメソッドは、Graphic のサブクラス内で定義する必要があります。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な垂直軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。


set-viewport-y (メソッド)
protected {BaseTextAreaScrollBox.set-viewport-y v:Distance}:void

この ViewportBoxViewport の垂直オフセットを、指定されたように設定します。

v: 垂直オフセットの新しい値 (ポイント単位) です。

説明

このメソッドは、Viewport の位置の設定時 ( ViewportBox.scroll-to または ViewportBox.vertical-position の一部として) にサブクラスにより呼び出されるようにします。

Distance-to-pixel の四捨五入により引き起こされる、表示におけるアーティファクトの発生を最小限に抑えるため、このメソッドは結果の値で Viewport.set-x-start を呼び出す前に vViewportBox.device-pixel-size の倍数に四捨五入します。