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

HBoxVBox のクラスが共通に備えるメカニズムを含む、それぞれのクラスの共通のスーパークラス。


コンストラクタ
clone-appearance-from:このタイプの新しいオブジェクトを作成するために Visual.clone-appearance が使用するコンストラクタ。
コンストラクタ protected {HVBox.clone-appearance-from
other:HVBox,
fixup:#{proc-type {Visual, Visual}:Visual}
}
default:HVBox を作成します。キーワード引数はオプション値を初期化するために使用されます。他の引数はボックスに追加されます。
コンストラクタ public {HVBox.default ...}

プロパティ
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public HVBox.display-context:#DisplayContext
distribution:この Box の子のそれぞれに同じ量のスペースを割り当てるかどうかを指定します。
ローカル オプション public HVBox.distribution:ChildSizeDistribution =ChildSizeDistribution.normal
spacing:この Box の連続する子の間に挿入するスペースの量を指定します。
ローカル オプション public HVBox.spacing:any =0pt
プロパティ 継承 LengthBreadthBox: first-elastic, second-elastic
プロパティ 継承 SequenceBox: child-array, completely-clonable-children?, contains-valid?, graphical-children, invalid-epoch, layouts-have-valid-sequence-number?, option-register-proc, ordered-children, registered-option-keys, reverse-ordered-children
プロパティ 継承 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, selection-context, shadow-color, shadow-spec, visible?, vorigin, width
プロパティ 継承 Visual: _style-element, clonable-class?, cursor, data-source, dragee, font-size, input-method-enabled?, input-method-keyboard-mode, name, options, options-present-here, style-class, style-element, style-manager, style-options, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers

メソッド
allocate-breadth:HVBox方向にレイアウトします。
protected {HVBox.allocate-breadth}:void
allocate-length:HVBox方向にレイアウトします。
protected {HVBox.allocate-length}:void
compute-breadth-elastic:HVBoxエラスティックを計算します。
protected {HVBox.compute-breadth-elastic
lc:LayoutContext,
constrained?:bool = {value {mandatory-keyword-arg-missing} false}
}:OriginElastic
compute-length-elastic:HVBox エラスティックを計算します。
protected {HVBox.compute-length-elastic
lc:LayoutContext,
constrained?:bool = {value {mandatory-keyword-arg-missing} false}
}:OriginElastic
option-changed:このオブジェクトにオプションの値が変更したことを通知します。
public {HVBox.option-changed key:String, value:any}:void
recompute-first-elastic:レイアウト ネゴシエーションでの最初のエラスティックを計算します。
protected {HVBox.recompute-first-elastic}:OriginElastic
recompute-our-layout:レイアウト ネゴシエーションを終了します。
protected {HVBox.recompute-our-layout}:void
recompute-second-elastic:レイアウト ネゴシエーションでの 2 番目のエラスティックを計算します。
protected {HVBox.recompute-second-elastic}:OriginElastic
set-spacing:spacing または display-context オプションの値の変化に応じて内部の状態を更新します。
protected {HVBox.set-spacing
new-spacing:any,
display-context:#DisplayContext = null
}:void
メソッド 継承 LengthBreadthBox: allocate-layout-object, attempt-revalidate-layout, check-property, constrain-height, constrain-width, get-height-preference, get-width-preference, propagate-request-layout, revalidate-second-elastic, set-size
メソッド 継承 SequenceBox: add, add-at-index, add-at-index-with-layout, after-reposition, before-reposition, clear, compare-children, draw, end-pagination, find, graphical-child-visible-at, internal-remove-child, note-attached, note-detaching, notify-option-children, pick-child, register-options, request-draw, request-pointer-trace, swap-children, validate-layout-sequence-numbers
メソッド 継承 BasicBox: contains-point?, find-graphic-at, handle-crossing, on-pointer-envelope-event, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 Box: find-test-children, get-delimited-child-text-selection, get-range-as-selected-text, get-visible-rect-in-root-into, 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-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, paginate, paint-with-decorations, replace-with, request-draw-rect, search-next, search-prev, set-layout, start-pagination, xy-offset-to
メソッド 継承 Visual: add-from-init-args, add-option, add-style-option, 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-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, release-key-focus, remove-option, remove-style-option, 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-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-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: 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-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 {HVBox.clone-appearance-from
other:HVBox,
fixup:#{proc-type {Visual, Visual}:Visual}
}

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



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

HVBox を作成します。キーワード引数はオプション値を初期化するために使用されます。他の引数はボックスに追加されます。




プロパティ詳細
display-context (非ローカル オプション)
public HVBox.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 オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。


distribution (ローカル オプション)
public HVBox.distribution:ChildSizeDistribution =ChildSizeDistribution.normal

この Box の子のそれぞれに同じ量のスペースを割り当てるかどうかを指定します。

説明

このオプションの値が ChildSizeDistribution.even の場合、各グラフィカルな子にこの Box の "長さ" 次元 (HBox の場合は水平、VBox の場合は垂直) で同じ量のスペースが割り当てられます。オプションが設定されていない場合、子のそれぞれに割り当てられるスペースはそれ自体のエラスティックによって異なります。

次の例の 2 つの行は、最初の行の distribution オプションの指定を除きまったく同じです。distribution オプションにより、テキストを含むすべてのボックスが同じサイズになりますが、distribution オプションが設定されていない場合はテキストのサイズに "圧縮" されることに注意してください。


{VBox
    spacing=4pt, border-color="red",
    {HBox
        {HBox
            spacing=4pt, distribution=ChildSizeDistribution.even,
            {Frame border-width=1pt, {center "Short"}},
            {Frame
                border-width=1pt, {center
                                      "Something rather long"}},
            {Frame border-width=1pt, {center "Intermediate"}}},
        {Fill}},
    {HBox
        {HBox
            spacing=4pt,
            {Frame border-width=1pt, {center "Short"}},
            {Frame
                border-width=1pt, {center
                                      "Something rather long"}},
            {Frame border-width=1pt, {center "Intermediate"}}},
        {Fill}}}


spacing (ローカル オプション)
public HVBox.spacing:any =0pt

この Box の連続する子の間に挿入するスペースの量を指定します。

注意事項

有効な値は次のとおりです。
既定値は 0pt です。

このオプションを使用して VBox 内のオブジェクト間にスペースを追加する簡単な例を次に示します。


{VBox spacing=8pt, "Hello", "How's things?", "Goodbye"}





メソッド詳細
allocate-breadth (メソッド)
protected {HVBox.allocate-breadth}:void

HVBox方向にレイアウトします。

lc: 現在のレイアウト ネゴシエーションを調整する LayoutContext
before, after: self に使用可能な、その起点前後のスペース。

説明

横方向は、方向に垂直な方向です(HVBox.compute-breadth-elastic を参照してください)。このメソッドでは、beforeafter の値に基づいて self の子オブジェクトそれぞれに横方向のスペースを割り当て、それぞれの子オブジェクトにその起点前後の割り当てられたサイズが通知されます。

プログラミング注意事項

このメソッドは、HVBox.recompute-second-elasticHVBox.recompute-our-layout の実装から呼び出されます。


allocate-length (メソッド)
protected {HVBox.allocate-length}:void

HVBox方向にレイアウトします。

lc: 現在のレイアウト ネゴシエーションを調整する LayoutContext
before, after: self に使用可能な、その起点前後のスペース。

説明

縦方向は、self の子が配置される方向です(HVBox.compute-length-elastic を参照してください)。このメソッドでは、self の子オブジェクトに使用可能なスペースを縦方向に割り当て、子のそれぞれにその起点前後の割り当てられたサイズが通知されます。

プログラミング注意事項

このメソッドは、HVBox.recompute-second-elasticHVBox.recompute-our-layout の実装から呼び出されます。


compute-breadth-elastic (メソッド)
protected {HVBox.compute-breadth-elastic
lc:LayoutContext,
constrained?:bool = {value {mandatory-keyword-arg-missing} false}
}:OriginElastic

HVBoxエラスティックを計算します。

lc: 現在のレイアウト ネゴシエーションを調整する LayoutContext
constrained?: 横方向がレイアウト ネゴシエーションの最初の次元である (たとえば、横の次元が幅でレイアウト ネゴシエーションが幅優先である) 場合は false で、横方向がレイアウト ネゴシエーションの最初の次元でない場合 (たとえば、幅優先ネゴシエーションにおける高さ) は true です。

説明

横方向は、方向に垂直な方向です(HVBox.compute-length-elastic を参照してください)。したがって、横方向は HBox に垂直で、VBox に水平です。このメソッドは、横方向で self の子オブジェクトのサイズ設定を取得し、それぞれを結合して self の横方向の全体的なサイズ設定を決定します。

プログラミング注意事項

このメソッドは、HVBox.recompute-first-elasticHVBox.recompute-second-elastic の実装から呼び出されます。


compute-length-elastic (メソッド)
protected {HVBox.compute-length-elastic
lc:LayoutContext,
constrained?:bool = {value {mandatory-keyword-arg-missing} false}
}:OriginElastic

HVBox エラスティックを計算します。

lc: 現在のレイアウト ネゴシエーションを調整する LayoutContext
constrained?: 縦方向がレイアウト ネゴシエーションの最初の次元である (たとえば、縦の次元が幅でレイアウト ネゴシエーションが幅優先である) 場合は false で、縦方向がレイアウト ネゴシエーションの最初の次元でない (たとえば、幅優先ネゴシエーションにおける高さ) 場合は true です。

説明

縦方向は、self の子が配置される方向ですしたがって、縦方向は HBox に水平で、VBox に垂直です。このメソッドは、縦方向の self の子オブジェクトのサイズ設定を取得し、それぞれを結合して self の縦方向の全体的なサイズ設定を決定します。

プログラミング注意事項

このメソッドは、HVBox.recompute-first-elasticHVBox.recompute-second-elastic の実装から呼び出されます。


option-changed (メソッド)
public {HVBox.option-changed key:String, value:any}:void

このオブジェクトにオプションの値が変更したことを通知します。

key: 値が変更されたオプションの名前を指定する String
value: 新しい値。オプションが削除されている場合、新しい値は "no value" となりますが、value には特別な値 unbound-option を指定します。このメソッド内のコードは、unbound-option? プロシージャを呼び出して、この値が存在するかどうかを確認する必要があります。option-value プロシージャの使用も、この値の処理に有益です。

プログラミング注意事項

オプションが (a) ローカル オプションの場合、あるいは (b) 非ローカル オプションで、このオプションに対してオブジェクトが option-change ハンドラ プロシージャを宣言している場合、オプションの値がバインド、変更、またはバインド解除されるたびにオプション パッケージはこのメソッドを一度呼び出します。

オーバーライド

既定の実装 OptionListInterface.option-changed では何も行われません。サブクラスでは、key がサブクラスの実装に関連するオプション名であるかどうかをテストした後、このメソッドをオーバーライドして、{super.option-changed key, value} を呼び出す必要があります。


recompute-first-elastic (メソッド)
protected {HVBox.recompute-first-elastic}:OriginElastic

レイアウト ネゴシエーションでの最初のエラスティックを計算します。

lc: レイアウト ネゴシエーションを管理する LayoutContext

説明

現在のレイアウト ネゴシエーションの最初の次元に従って self のサイズ設定を計算します。したがって、この次元が幅の場合、メソッドは self の幅設定を表す OriginElastic を返し、高さを先に処理するレイアウト ネゴシエーションが進行中の場合は、self の高さ設定を表す OriginElastic を代わりに返します。

プログラミング注意事項

キャッシュされたサイズ設定が使用可能でない (または有効でない) のでサイズ設定を計算する必要がある場合、このメソッドは、self の内部メソッドから呼び出されます。

オーバーライド

LengthBreadthBox はこれを抽象メソッドとして宣言します。具象サブクラスでは、このメソッドが必要な OriginElastic 値を計算するように、このメソッドをオーバーライドする必要があります。


recompute-our-layout (メソッド)
protected {HVBox.recompute-our-layout}:void

レイアウト ネゴシエーションを終了します。

lc: レイアウト ネゴシエーションを管理する LayoutContext
before, after: このメソッドの結果の計算に使用されるサイズ制約。

説明

現在のレイアウト ネゴシエーションの最初の次元でない次元に従って self のサイズを設定します。したがって、最初の次元が幅の場合、このメソッドはこのオブジェクトの高さの特性を示す上昇値および下降値として、それぞれ before および after を使用します。逆に、高さを先に処理するレイアウト ネゴシエーションでは、このオブジェクトの幅の特性を示す左右の範囲としてそれぞれ before および after を使用します。最終的にこのメソッドを呼び出すと、このオブジェクトのそれぞれの子で呼び出される Graphic.set-size になります。

プログラミング注意事項

このオブジェクトのそれぞれの子の set-size メソッドを呼び出すときには、このメソッドは self の内部のメソッドから呼び出されます。

オーバーライド

LengthBreadthBox はこれを抽象メソッドとして宣言します。具象サブクラスでは、このメソッドが必要な操作を実行するように、このメソッドをオーバーライドする必要があります。


recompute-second-elastic (メソッド)
protected {HVBox.recompute-second-elastic}:OriginElastic

レイアウト ネゴシエーションでの 2 番目のエラスティックを計算します。

lc: レイアウト ネゴシエーションを管理する LayoutContext
before, after: このメソッドの結果の計算に使用されるサイズ制約。

説明

現在のレイアウト ネゴシエーションの最初の次元でない次元に従って self のサイズ設定を計算します。したがって、最初の次元が幅の場合、このメソッドは self の高さ設定を表す OriginElastic を返し、高さを先に処理するレイアウト ネゴシエーションが進行中の場合、self の幅設定を表す OriginElastic を代わりに返します。

before および after は、レイアウト ネゴシエーションの最初の次元に従った適切なサイズ制約を表します。こうした値は、Graphic.constrain-width の呼び出しにおいて lextentrextent の役割を果たします。あるいは、高さを先に処理するネゴシエーションでは、Graphic.constrain-height の呼び出しにおいて ascentdescent の役割を果たします。

プログラミング注意事項

キャッシュされたサイズ設定が使用可能でない (または有効でない) のでサイズ設定を計算する必要がある場合、このメソッドは、self の内部メソッドから呼び出されます。

オーバーライド

LengthBreadthBox はこれを抽象メソッドとして宣言します。具象サブクラスでは、このメソッドが必要な OriginElastic 値を計算するように、このメソッドをオーバーライドする必要があります。


set-spacing (メソッド)
protected {HVBox.set-spacing
new-spacing:any,
display-context:#DisplayContext = null
}:void

spacing または display-context オプションの値の変化に応じて内部の状態を更新します。

new-spacing: このオブジェクトの spacing オプションの新しい値。
display-context: このオブジェクトに現在有効な DisplayContext

プログラミング注意事項

このメソッドは、このオブジェクトの spacing または display-context オプションの値に変化があると必ず呼び出されます。