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

Box がグラフィック階層のルートで自分自身を検索する場合にレイアウト ネゴシエーションを行うのに必要なロジックを含む Box の基本サブクラス。

注意事項

BasicBox は、GetBoundsBox のサブクラス、つまり、Curl グラフィック システムに含まれるすべての基本 Box のサブクラスです。

コンストラクタ
clone-appearance-from:このタイプの新しいオブジェクトを作成するために Visual.clone-appearance が使用するコンストラクタ。
コンストラクタ protected {GetBoundsBox.clone-appearance-from other:GetBoundsBox}
default:このクラスの新しいオブジェクトを作成します。
コンストラクタ public {GetBoundsBox.default ...}

プロパティ
layout-locally-valid?:false の場合は、このオブジェクト自体で request-layout が実行されたこと (その子孫の 1 つで実行されたのではなく) を意味します。
フィールド public GetBoundsBox.layout-locally-valid?:bool =false
layout-valid?:このオブジェクトのレイアウトが有効かどうかを判断します。
フィールド public GetBoundsBox.layout-valid?:bool =false
プロパティ 継承 Box: clip-child-shadows?, completely-clonable-children?, graphical-children, ordered-children, reverse-ordered-children
プロパティ 継承 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, clonable-class?, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-element, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
get-bounds:このオブジェクトの境界を返します。
public {GetBoundsBox.get-bounds}:GRect
get-elastic-bounds-into:レイアウト ネゴシエーションを行い、その結果を GRect に格納します。
protected {GetBoundsBox.get-elastic-bounds-into}:void
get-nonparent-bounds-into:レイアウト ネゴシエーションを行い、その結果を GRect に格納します。
protected {GetBoundsBox.get-nonparent-bounds-into gr:GRect}:void
propagate-request-layout:Box からそのグラフィカルな親 (存在する場合) に新しいレイアウト ネゴシエーションの要求を伝播します。
public {GetBoundsBox.propagate-request-layout epoch:int}:void
request-layout:Graphic のレイアウト設定が変更されたため、新しいレイアウト ネゴシエーションを行う必要があることを通知します。
public {GetBoundsBox.request-layout}:void
set-size:このオブジェクトにレイアウト幅と高さを代入します。
public {GetBoundsBox.set-size lc:LayoutContext, bounds:GRect}:void
validate-layout:Box のレイアウトを有効にします。
public {GetBoundsBox.validate-layout}:void
メソッド 継承 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, note-attached, note-detaching, search-next-here, search-prev-here
メソッド 継承 Graphic: after-reposition, attempt-revalidate-layout, before-reposition, constrain-height, constrain-width, contains-point?, create-pagination-state, detach, draw, draw-range-as-selected, draw-shadow, end-pagination, find-ancestor, find-graphic-at, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-height-preference, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-top-left-in-ancestor, get-visible-bounds-into, get-width-preference, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paginate, paint-with-decorations, pointer-enter-occurred, pointer-leave-occurred, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, set-layout, start-pagination, xy-offset-to
メソッド 継承 Visual: add, add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, clone-appearance-helper, get-focus-manager, get-layout-context, get-test-parent, get-test-property, get-text, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-caret-position, on-drag-leave, on-pointer-envelope-event, 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
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 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-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-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, 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-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
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 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, notify-option-children, option-change-notify, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, register-options, 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
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
clone-appearance-from (コンストラクタ)
protected {GetBoundsBox.clone-appearance-from other:GetBoundsBox}

このタイプの新しいオブジェクトを作成するために Visual.clone-appearance が使用するコンストラクタ。

other: クローンする GetBoundsBox

注意事項

クローン化をサポートする GetBoundsBox のサブクラスには、このコンストラクタを呼び出すコンストラクタが必要です。ただし、これらのコンストラクタがそれぞれ自身のオプションをクローン化する場合は、その限りではありません。


default (コンストラクタ)
public {GetBoundsBox.default ...}

このクラスの新しいオブジェクトを作成します。




プロパティ詳細
layout-locally-valid? (フィールド)
public GetBoundsBox.layout-locally-valid?:bool =false

false の場合は、このオブジェクト自体で request-layout が実行されたこと (その子孫の 1 つで実行されたのではなく) を意味します。



layout-valid? (フィールド)
public GetBoundsBox.layout-valid?:bool =false

このオブジェクトのレイアウトが有効かどうかを判断します。

説明

layout-valid? が false である場合、このオブジェクトが最初に配置されなかったか、あるいは、このオブジェクトまたはその子孫に対して GetBoundsBox.request-layout が実行されて、新しいレイアウト計算が完了していません。





メソッド詳細
get-bounds (メソッド)
public {GetBoundsBox.get-bounds}:GRect

このオブジェクトの境界を返します。

注意事項

このオブジェクトがレイアウトを持っている場合はそのレイアウト境界を返し、そうでなければ親のない境界を返します。


get-elastic-bounds-into (メソッド)
protected {GetBoundsBox.get-elastic-bounds-into}:void

レイアウト ネゴシエーションを行い、その結果を GRect に格納します。

lc: このレイアウト ネゴシエーションに使用する LayoutContext
gr: 結果を格納する GRect

説明

このメソッドは、self に対する width-first レイアウト ネゴシエーションを次のように行います。
  1. self.get-width-preference を呼び出します。これにより、幅設定 wpref が返されます。
  2. wpref の最初の最後のコンポーネントのユーザー設定サイズを lextent 引数と rextent 引数として self.constrain-width を呼び出します。この呼び出しの結果が、高さ設定 hpref になります。
  3. hpref の最初と最後のコンポーネントのユーザー設定サイズをそれぞれオブジェクトのアセントとディセントとして使用して、self.set-size を呼び出します。
この作業の結果、self は、その実際のサイズがユーザー設定サイズになるように配置されます。

上記のメソッドの呼び出し中にレイアウトの無効化 (Graphic.request-layout の呼び出し) が発生した場合、このメソッドはレイアウト ネゴシエーションを繰り返し実行しようとはしません。したがって、get-elastic-bounds-into の呼び出し側が、レイアウトの無効化が発生したかどうかをチェックし (self.layout-valid? が true であるか false であるかを確認し)、レイアウト ネゴシエーションの再試行などの適切な復元処理を実行する必要があります。


get-nonparent-bounds-into (メソッド)
protected {GetBoundsBox.get-nonparent-bounds-into gr:GRect}:void

レイアウト ネゴシエーションを行い、その結果を GRect に格納します。

gr: 結果を格納する GRect

説明

このメソッドは、self.get-layout-context を呼び出すことによって LayoutContext を取得して、その取得した LayoutContextgr を引数として self.get-elastic-bounds-into を呼び出します。


propagate-request-layout (メソッド)
public {GetBoundsBox.propagate-request-layout epoch:int}:void

Box からそのグラフィカルな親 (存在する場合) に新しいレイアウト ネゴシエーションの要求を伝播します。

epoch: このレイアウト無効化に関連付けられている Layout Epoch。これは、通常、get-layout-epoch を使用して得られる現在の Layout Epoch です。

プログラミング注意事項

一般的に、このメソッドは、Box.request-layout から Box の親にレイアウトの要求を伝えるために呼び出されるか、Layout.request-layout から呼び出されます。

Box でこのメソッドを呼び出すことは、Box のグラフィカルな子孫のいずれかが新しいレイアウト ネゴシエーションを要求していることを示します。この状況は、Box での Box.request-layout の呼び出しとは対照的です。この場合は、Box 自体が新しいレイアウト ネゴシエーションを要求していることを意味します。これらの 2 つの別個のメソッドが提供されるのは、その後のレイアウト ネゴシエーションの初めに Graphic.attempt-revalidate-layout が呼び出されるときに、異なるアクションを保証するためです。Box.propagate-request-layout の呼び出しによって、この Box にレイアウト要求が通知された場合は、Box 自体では何も変更されていないので、Box の子で Graphic.attempt-revalidate-layout メソッドが呼び出されたときにすべての子の答えが true であれば、BoxGraphic.attempt-revalidate-layout に対する答えは常に true になります。しかし、Box.request-layout が呼び出された場合は、Box は、そのすべての子のレイアウトについて有効性を再検証できたとしても、それ自体のレイアウトが有効とは認められない場合があります。これは、グラフィカルな子の追加や削除、またはそれらの子の空白や配列での変更など、Box 自体の構造で変更が加えられている可能性があるからです。

オーバーライド

このメソッドは、情報を保持してレイアウト無効化を追跡する Box サブクラスでオーバーライドできます。このようなオーバーライド メソッドにはすべて super.propagate-request-layout の呼び出しが必要です。このメソッドは、グラフィック階層のルートになるように設計されている View などのクラスでもオーバーライドされます。この場合、レイアウト要求を記録し、新しいレイアウト ネゴシエーションに合わせて整列させるコードによってメソッドがオーバーライドされます。


request-layout (メソッド)
public {GetBoundsBox.request-layout}:void

Graphic のレイアウト設定が変更されたため、新しいレイアウト ネゴシエーションを行う必要があることを通知します。

オーバーライド

request-layout 操作の実行時に更新される記録情報を持つ Graphic のサブクラスによって、このメソッドをオーバーライドできます。このようなオーバーライド メソッドは、必ず {super.request-layout} を呼び出します。オーバーライド メソッドの例として、BasicBox.request-layout があります。


set-size (メソッド)
public {GetBoundsBox.set-size lc:LayoutContext, bounds:GRect}:void

このオブジェクトにレイアウト幅と高さを代入します。

説明

このオブジェクトで set-size を呼び出すと、オブジェクトのレイアウト サイズを代入し、オブジェクトのレイアウト ネゴシエーションを完了します。グラフィック階層のすべてのオブジェクトにレイアウト サイズが代入された後で階層のレイアウト ネゴシエーションが完了します。
lc: このレイアウト ネゴシエーションに対して有効な LayoutContext
bounds: このオブジェクトの境界ボックスの左右および上下の範囲をオブジェクトの起点から相対的に示す GRect

プログラミング注意事項

このメソッドは、オブジェクトのグラフィカルな親によって呼び出されます。

オーバーライド

既定のメソッド Graphic.set-size は何も行ないません。Graphicのサブクラスはこのメソッドをオーバーライドして、ここで提供した情報をインターセプトできます。


validate-layout (メソッド)
public {GetBoundsBox.validate-layout}:void

Box のレイアウトを有効にします。

プログラミング注意事項

このメソッドは、境界および原点の位置についての情報のクエリができるように Box のレイアウトを有効にする必要があるときに呼び出されます。このメソッドは、一般に、レイアウト システムの一部をなすコードによってのみ呼び出されます。

オーバーライド

この抽象メソッドは、Box の 具象サブクラスによって、必要なアクションを実際に実行するコードでオーバーライドされなければなりません。