SingleChildContainer<T> クラス
単一の子の保持をコンポジションで提供するコンテナ。子の差し替え時にownerへのAdopt/Dropを行い、 ライフサイクル(Attach/Detach/Visit)の転送ヘルパーを提供する。
名前空間: FloatSoda.RenderObjects
アセンブリ: FloatSoda.dll
public class SingleChildContainer<T> where T : RenderObject型パラメーター
Section titled “型パラメーター”T
object ← SingleChildContainer<T>
継承したメンバー
Section titled “継承したメンバー”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
コンストラクター
Section titled “コンストラクター”SingleChildContainer(RenderObject)
Section titled “SingleChildContainer(RenderObject)”単一の子の保持をコンポジションで提供するコンテナ。子の差し替え時にownerへのAdopt/Dropを行い、 ライフサイクル(Attach/Detach/Visit)の転送ヘルパーを提供する。
public SingleChildContainer(RenderObject owner)パラメーター
Section titled “パラメーター”owner RenderObject
子を所有し、追加と削除の通知を受け取るRenderObject。
保持している子。差し替え時は旧子をDropし新子をAdoptする。
public T? Child { get; set; }プロパティの値
Section titled “プロパティの値”T?
子を差し替えると、所有者をLayout Dirtyとしてマークします。 同じ子を再設定した場合も、子の取り外しと追加が行われるためLayout Dirtyとなります。
Attach(RenderPipeline?)
Section titled “Attach(RenderPipeline?)”子をRenderPipelineへアタッチする。ownerのAttachから呼ぶ。
public void Attach(RenderPipeline? pipeline)パラメーター
Section titled “パラメーター”pipeline RenderPipeline?
Detach()
Section titled “Detach()”子をデタッチする。ownerのDetachから呼ぶ。
public void Detach()VisitChildren(Action<RenderObject>)
Section titled “VisitChildren(Action<RenderObject>)”子が存在すればvisitorを適用する。
public void VisitChildren(Action<RenderObject> visitor)パラメーター
Section titled “パラメーター”visitor Action<RenderObject>