SkinnableFrame (クラス)
public SkinnableFrame {inherits Frame}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.STYLED-CONTROLS.

SkinSpec のデコレーションを委譲する Frame

注意事項

このオブジェクトは、"SkinnableFrame"のスタイル ルールを記述することでスタイル化することが出来ます。
導入: バージョン 7.0

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

プロパティ
clonable-class?:当該クラスがクローン化可能である場合は、true を返します。その他の場合は false を返します。
アクセサ protected SkinnableFrame.clonable-class?:bool
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public SkinnableFrame.display-context:#DisplayContext
skin:このオブジェクトにデコレーションするスキンの仕様です。
ローカル オプション public SkinnableFrame.skin:#SkinSpec =null
skin-orientation:描画の時のスキンデコレーションの方向。
ローカル オプション public SkinnableFrame.skin-orientation:any =null
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public SkinnableFrame.style-element:String
visual-state:このオブジェクトを描画するときに使用する SkinVisualState
ローカル オプション public SkinnableFrame.visual-state:SkinVisualState =SkinVisualState.enabled
プロパティ 継承 Frame: halign, halign-spec, hstretch?, hstretch?-spec, valign, valign-spec, vstretch?, vstretch?-spec
プロパティ 継承 BaseFrame: child, completely-clonable-children?, graphical-children, ordered-children, reverse-ordered-children, width-first?
プロパティ 継承 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, 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
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
after-reposition:Graphic が移動またはサイズ変更されたことを、Graphic に通知します。
public {SkinnableFrame.after-reposition
layout-context:LayoutContext
}:void
before-reposition:Graphic が移動またはサイズ変更されることを、Graphic に対して通知します。
public {SkinnableFrame.before-reposition
layout-context:LayoutContext
}:void
clone-appearance-helper:クローンを作成し、クローン自体を返します。
protected {SkinnableFrame.clone-appearance-helper
fixup:#{proc-type {Visual, Visual}:Visual}
}:Visual
contains-point?:指定されたポイントで発生するイベントが、ターゲット ボックスと、そのいずれかのグラフィカルな子のどちらに関するものかを判断します。
public {SkinnableFrame.contains-point? x:Distance, y:Distance}:bool
draw:このオブジェクトの可視表現を描画します。
public {SkinnableFrame.draw r:Renderer2d}:void
set-size:このオブジェクトにレイアウト幅と高さを代入します。
public {SkinnableFrame.set-size lc:LayoutContext, bounds:GRect}:void
メソッド 継承 Frame: add, remove-child
メソッド 継承 BaseFrame: add-internal, allocate-layout-object, attempt-revalidate-layout, 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
メソッド 継承 BasicBox: 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: 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
メソッド 継承 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, 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
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
clone-appearance-from (コンストラクタ)
protected {SkinnableFrame.clone-appearance-from
other:SkinnableFrame,
fixup:#{proc-type {Visual, Visual}:Visual}
}

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

other: クローンする SkinnableFrame
fixup: other に子が 1 つある場合は、その子のクローンを作成するとき、このプロシージャが Visual.clone-appearance に渡されます。

注意事項

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


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

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

...: Frame のオプションと追加の引数。
導入: バージョン 7.0



プロパティ詳細
clonable-class? (アクセサ)
アクセサ protected SkinnableFrame.clonable-class?:bool

当該クラスがクローン化可能である場合は、true を返します。その他の場合は false を返します。

オーバーライド

既定の実装は false を返します。クローン化機能を提供するクラスは、{type-of self} == {compile-time-type-of self} を返すためには、このゲッターをオーバーライドする必要があります。クローン化可能な Visual が必ずしもクローン化可能であるとは限らないので、単に true を返すだけでは正しくありません。
このメソッドをオーバーライドする場合は、Visual.clone-appearance-helper もオーバーライドする必要があります。


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


skin (ローカル オプション)
public SkinnableFrame.skin:#SkinSpec =null

このオブジェクトにデコレーションするスキンの仕様です。

導入: バージョン 7.0


skin-orientation (ローカル オプション)
public SkinnableFrame.skin-orientation:any =null

描画の時のスキンデコレーションの方向。

説明

このプロパティは、描画される時に skin に渡されます。通常は OrientationTabPlacement の時もあります。詳細の情報は SkinSpec.orientation-aware?SkinSpec.draw-skin を参照してください。
導入: バージョン 7.0


style-element (アクセサ)
アクセサ public SkinnableFrame.style-element:String

スタイリングの目的のための、この Visual の "要素" や "型" です。

説明

この実装によって Visual._style-elementの値が返されますが、通常は定数を返すためにオーバーライドされます。

オーバーライド

Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入: バージョン 6.0


visual-state (ローカル オプション)
public SkinnableFrame.visual-state:SkinVisualState =SkinVisualState.enabled

このオブジェクトを描画するときに使用する SkinVisualState

導入: バージョン 7.0





メソッド詳細
after-reposition (メソッド)
public {SkinnableFrame.after-reposition
layout-context:LayoutContext
}:void

Graphic が移動またはサイズ変更されたことを、Graphic に通知します。

layout-context: このオブジェクトを含んでいるグラフィック階層のサブツリーに対応する LayoutContext オブジェクト。

プログラミング注意事項

この Graphic を移動またはサイズ変更した操作の前に、Graphic.before-reposition を呼び出した場合、このメソッドはこの操作後に呼び出されます。この操作の前にオブジェクトが見えなかったとしても、操作前に Graphic.before-reposition を呼び出さなかった場合は、この操作後に、Graphic.after-reposition でなく Graphic.request-draw が呼び出されます。

Graphic に対して g.after-reposition g が呼び出されるのは、この操作の前に g.before-reposition を呼び出した場合のみです。ただし、この操作の前に g.before-reposition を呼び出しても、この操作の後に g.after-reposition が呼び出されない場合もあります。このような事態が発生するのは、オブジェクトを移動やサイズ変更がなかったと (g の親などが) 判断した場合、あるいは他のオブジェクトが、操作前と操作後の両方で、g の位置の可視境界全体に対する LayoutContext.request-draw-rect-in-root 操作を 1 回以上呼び出した場合です。

Graphic.before-repositionGraphic.after-reposition はともに、オブジェクトの位置が有効な場合にしか呼び出されません。

オーバーライド

既定の定義 Graphic.after-reposition は、単に Graphic.request-draw を呼び出すだけです。Graphic.request-draw は、Graphic.before-repositionの既定の実装でも使用されていることを前提とした適切な処理方法です。ただし、Graphic.before-reposition をオーバーライドする場合は、Graphic.after-reposition もオーバーライドする必要があります。


before-reposition (メソッド)
public {SkinnableFrame.before-reposition
layout-context:LayoutContext
}:void

Graphic が移動またはサイズ変更されることを、Graphic に対して通知します。

layout-context: このオブジェクトを含んでいるグラフィック階層のサブツリーに対応する LayoutContext オブジェクト。

プログラミング注意事項

このメソッドは、レイアウト ネゴシエーションまたはその他の操作で可視オブジェクトを移動またはサイズ変更するときに必ず呼び出します。このメソッドは、オブジェクトが見えない場合でも呼び出すことができます。また、このメソッドを呼び出したとしても、その後オブジェクトを移動またはサイズ変更しなくてもかまいません。

オーバーライド

既定の定義 Graphic.before-reposition は、 単にGraphic.request-draw を呼び出します。これは常に正しい処理です。ただし、高度なオブジェクトでは、このメソッドを次のいずれかのコードでオーバーライドできます。


clone-appearance-helper (メソッド)
protected {SkinnableFrame.clone-appearance-helper
fixup:#{proc-type {Visual, Visual}:Visual}
}:Visual

クローンを作成し、クローン自体を返します。

オーバーライド

既定の実装はエラーをスローします。クローン化機能を提供するクラスは、
{{compile-time-type-of self}.clone-appearance-from self, fixup}
を返すためには、このゲッターをオーバーライドする必要があります。


contains-point? (メソッド)
public {SkinnableFrame.contains-point? x:Distance, y:Distance}:bool

指定されたポイントで発生するイベントが、ターゲット ボックスと、そのいずれかのグラフィカルな子のどちらに関するものかを判断します。

x, y: ポイントの座標。ターゲット オブジェクトの起点を基準として表現します。

プログラミング注意事項

このメソッドは、通常は、ポインタ イベントをグラフィカルな子に転送するかどうかを決定するためなど、主として内部目的で用意されています。

注意事項

このメソッドは、ポイントがグラフィカルな子によって占められる領域内 (境界を含む) にある場合は、グラフィカルな子が以下のプロパティを持っていると判断して true を返します。

一般に、ボックス内のターゲット ポイントがボックスの可視部分として描画されていない場合、このメソッドは false を返します。

TextFlowBox に選択可能なテキストが含まれている場合 (つまりプロパティ text-selectable? が値 true である場合) は、ポイントが境界ボックス内にある限り、メソッドは true を返します。これは、その領域内の任意のイベントが、ボックス内のテキスト選択に関連付けられる可能性があるからです。それ以外の場合は、TextFlowBox は前述したように、他のボックスと同じように扱われます。


draw (メソッド)
public {SkinnableFrame.draw r:Renderer2d}:void

このオブジェクトの可視表現を描画します。

renderer2d: このオブジェクトを使用してそれ自身を描画する Renderer2d

オーバーライド

既定のメソッド Graphic.draw は何もしません。Graphic のサブクラスは、必要とされる描画の操作を実行するコードでこのメソッドをオーバーライドしなければなりません。
このメソッドをオーバーライドする場合は、再描画が必要となる時はいつでも、描画する Graphic の範囲が有効でない事を確認しなければなりません。たとえば、データの値を更新するために描画をする時は、データの値が変わる時にアプレットは必ず Graphic.request-drawGraphic.request-draw-rectを呼び出さなければなりません。


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

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

説明

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

プログラミング注意事項

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

オーバーライド

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