TextReceiver (クラス)
public abstract TextReceiver
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.

TextVisualオブジェクトのコンテンツに関する情報を受け取るオブジェクトの抽象ベースクラス。

説明

この抽象クラスは、TextVisual オブジェクトの stream-contents-to メソッドを呼ぶことで得られる情報を受け取るオブジェクトを定義するためにサブクラス化されます。一度、TextReceiverTextVisual にアタッチされます。それは、TextVisual.stream-contents-to が呼ばれ、TextVisual における変化は TextReceiver.note-option-changed-locally メソッドなどを介して TextReceiver に伝えられるためです。
導入: バージョン 7.0

コンストラクタ
default:TextReceiver オブジェクトを作成します。
コンストラクタ protected {TextReceiver.default}

メソッド
characters:文字のシーケンスをこのTextReceiverに伝達する為に、TextVisual.stream-contents-toから呼び出されます。
public abstract {TextReceiver.characters
s:StringInterface,
start:int,
length:int
}:void
embedded-graphic:エンベッドされたGraphicTextReceiverに伝達する為にTextVisual.stream-contents-toから呼び出されます。
public abstract {TextReceiver.embedded-graphic obj:Graphic}:void
end-element:TextVisualに関する情報の終了を報告する為に、TextVisual.stream-contents-toから呼び出されます。
public abstract {TextReceiver.end-element tv:TextVisual}:void
get-origin-in-visual-parent:visual-parentに対するTextVisualの起点を返します。
public abstract {TextReceiver.get-origin-in-visual-parent}:(x:Distance, y:Distance)
get-top-left-of-visual:TextVisualの左上の場所を返します。
public abstract {TextReceiver.get-top-left-of-visual}:(x:Distance, y:Distance)
get-visual-bounds:TextVisual境界情報を提供します。
public abstract {TextReceiver.get-visual-bounds
tv:TextVisual,
into:#GRect = null
}:GRect
graphical-parent-for:TextVisualを含んでいるもっとも内側のグラフィックBoxを返します。
public abstract {TextReceiver.graphical-parent-for tv:TextVisual}:#Box
note-element-child-removed:TextVisualから子オブジェクトが削除された事をTextReceiverに通知する為に呼び出されます。
public {TextReceiver.note-element-child-removed}:void
note-element-cleared:TextVisualがクリアされた事をTextReceiverに通知する為に呼び出されます。
public {TextReceiver.note-element-cleared tv:TextVisual}:void
note-element-content-added:TextVisualに新しいオブジェクトが追加された事をTextReceiverに通知する為に呼び出されます。
public {TextReceiver.note-element-content-added}:void
note-option-changed-locally:TextVisualで、ローカルに設定されたオプションの値が変更された事をTextReceiverに通知する為に呼び出されます。
public {TextReceiver.note-option-changed-locally
tv:TextVisual,
item:OptionItem,
removed?:bool
}:void
note-receiver-detached:指定されたTextVisualは、TextReceiverと関係がない事をTextReceiverに通知する為に呼び出されます。
public {TextReceiver.note-receiver-detached tv:TextVisual}:void
pick-child-for:指定された座標でのイベントをフォワードする為にTextVisualの子オブジェクトを取り出します。
public abstract {TextReceiver.pick-child-for}:#EventForwarder
request-draw:Curlのレンダリング システムにTextVisualを再描画するように依頼します。
public abstract {TextReceiver.request-draw}:void
start-element:新しいTextVisualの開始を報告する為に、TextVisual.stream-contents-toから呼び出されます。
public abstract {TextReceiver.start-element}:void
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
protected {TextReceiver.default}

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







メソッド詳細
characters (メソッド)
public abstract {TextReceiver.characters
s:StringInterface,
start:int,
length:int
}:void

文字のシーケンスをこのTextReceiverに伝達する為に、TextVisual.stream-contents-toから呼び出されます。

s: 伝達される文字を含むStringInterface
start: sの中で最初に伝達される文字のインデックス。
length: 伝達される文字の長さ。startから開始します。


embedded-graphic (メソッド)
public abstract {TextReceiver.embedded-graphic obj:Graphic}:void

エンベッドされたGraphicTextReceiverに伝達する為にTextVisual.stream-contents-toから呼び出されます。

obj: 伝達される Graphic です。


end-element (メソッド)
public abstract {TextReceiver.end-element tv:TextVisual}:void

TextVisualに関する情報の終了を報告する為に、TextVisual.stream-contents-toから呼び出されます。

tv: 情報の報告が完了したTextVisualオブジェクト


get-origin-in-visual-parent (メソッド)
public abstract {TextReceiver.get-origin-in-visual-parent}:(x:Distance, y:Distance)

visual-parentに対するTextVisualの起点を返します。

tv: 起点の位置が必要なTextVisual

戻り値

visual-parentの起点から、tvの起点へのx,yオフセット

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


get-top-left-of-visual (メソッド)
public abstract {TextReceiver.get-top-left-of-visual}:(x:Distance, y:Distance)

TextVisualの左上の場所を返します。

tv: 左上の位置が必要なTextVisual

戻り値

tvの起点から、tvの左上隅へのx,yオフセット

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


get-visual-bounds (メソッド)
public abstract {TextReceiver.get-visual-bounds
tv:TextVisual,
into:#GRect = null
}:GRect

TextVisual境界情報を提供します。

tv: 境界が必要なTextVisual
into: 領域が書かれるGRect。この引数がnullの場合、GRectオブジェクトは情報を保持する為に割り当てられます。

戻り値

必要な境界情報を含むGRecttvの座標原点に関連しています。

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


graphical-parent-for (メソッド)
public abstract {TextReceiver.graphical-parent-for tv:TextVisual}:#Box

TextVisualを含んでいるもっとも内側のグラフィックBoxを返します。

tv: グラフィックの親が必要なTextVisual

戻り値

グラフィック上の親。tvがグラフィック上の親を持たない場合には、nullになります。一般的に、このグラフィック上の親はTextFlowBoxまたは、それに類似したテキスト コンテナになります。

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


note-element-child-removed (メソッド)
public {TextReceiver.note-element-child-removed}:void

TextVisualから子オブジェクトが削除された事をTextReceiverに通知する為に呼び出されます。

tv: remove-childメソッドを呼び出してオブジェクトが削除された親TextVisual
c: 削除された子オブジェクト


note-element-cleared (メソッド)
public {TextReceiver.note-element-cleared tv:TextVisual}:void

TextVisualがクリアされた事をTextReceiverに通知する為に呼び出されます。

tv: clear メソッドの呼び出しによって、クリアされたTextVisual


note-element-content-added (メソッド)
public {TextReceiver.note-element-content-added}:void

TextVisualに新しいオブジェクトが追加された事をTextReceiverに通知する為に呼び出されます。

tv: addメソッドを呼び出して、オブジェクトが追加された親TextVisual
g: 追加された新しいオブジェクト。これは、オブジェクトを追加するTextVisual.addによって返される値と同じになります。


note-option-changed-locally (メソッド)
public {TextReceiver.note-option-changed-locally
tv:TextVisual,
item:OptionItem,
removed?:bool
}:void

TextVisualで、ローカルに設定されたオプションの値が変更された事をTextReceiverに通知する為に呼び出されます。

tv: オプションの値が変更された親 TextVisual
item: 変更されたオプションのOptionItem
removed?: tvでオプションがアンセットされているとtrue。そうでなければ、false。

注意事項

removed?が false の場合、itemは、新しいセットオプションのOptionItemです。removed?が true の場合、 itemは、tvから削除されたばかりのオプション バインディングのOptionItemになります。


note-receiver-detached (メソッド)
public {TextReceiver.note-receiver-detached tv:TextVisual}:void

指定されたTextVisualは、TextReceiverと関係がない事をTextReceiverに通知する為に呼び出されます。

tv: selfが、TextReceiverとなる為の親TextVisual

注意事項

この呼び出しは、このオブジェクトはもはやTextReceiverでないのでtvが変更された直後に発生します。


pick-child-for (メソッド)
public abstract {TextReceiver.pick-child-for}:#EventForwarder

指定された座標でのイベントをフォワードする為にTextVisualの子オブジェクトを取り出します。

tv: イベント(一般的にはPointerEnvelopeEvent)が発生したTextVisual
x: イベントのx座標
y: イベントのy座標

戻り値

イベントがフォワードされる子オブジェクト。イベントがフォワードされる子オブジェクトがない時はnullになります。

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


request-draw (メソッド)
public abstract {TextReceiver.request-draw}:void

Curlのレンダリング システムにTextVisualを再描画するように依頼します。

tv: 再描画されるTextVisual
lc: tvを含むグラフィック階層に適用されるLayoutContext

注意事項

tvは、現在このTextReceiverに接続されている TextVisualでなければなりません。


start-element (メソッド)
public abstract {TextReceiver.start-element}:void

新しいTextVisualの開始を報告する為に、TextVisual.stream-contents-toから呼び出されます。

tv: この呼び出しの後に情報が報告されるTextVisualオブジェクト。
tag: tvtext-visual-tagプロパティで見つかったTextVisualTag値。