WindowWidget クラス
ウィンドウ設定(タイトル・ルート制約)を担うルートウィジェットの基底。 ウィンドウサイズの決定方法(Size による Tight / Loosen 制約)はこの基底が責務を持ち、 表示先(OpenVR オーバーレイ / 将来のデスクトップウィンドウ)は派生型が決めます。 CreateWindow に渡して使用します。
名前空間: FloatSoda.Widgets
アセンブリ: FloatSoda.dll
public abstract record WindowWidget : InheritedWidget, IEquatable<Widget>, IEquatable<InheritedWidget>, IEquatable<WindowWidget>object ← Widget ← InheritedWidget ← WindowWidget
実装するインターフェイス
Section titled “実装するインターフェイス”IEquatable<Widget>, IEquatable<InheritedWidget>, IEquatable<WindowWidget>
継承したメンバー
Section titled “継承したメンバー”InheritedWidget.Child, InheritedWidget.ScopeType, InheritedWidget.CreateElement(), InheritedWidget.UpdateShouldNotify(InheritedWidget), Widget.Key, Widget.CanUpdate(Widget, Widget), Widget.CreateElement(), Widget.GetHashCode(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
ScopeType
Section titled “ScopeType”具象型によらず WindowWidget として lookup できるよう、基底型で登録する。
public override sealed Type ScopeType { get; }プロパティの値
Section titled “プロパティの値”ウィンドウの固定サイズ。null の場合は Child のレイアウト結果サイズに ウィンドウサイズが追従します(Loosen)。指定するとそのサイズで子をレイアウトします(Tight)。
public SKSize? Size { get; init; }プロパティの値
Section titled “プロパティの値”ウィンドウに表示されるタイトル。SteamVR 上の表示名(ダッシュボードタブ名など)になります。
public required string Title { get; init; }プロパティの値
Section titled “プロパティの値”CreateElement()
Section titled “CreateElement()”ウィンドウ設定の共有とルート描画領域へのサイズ反映を管理するElementを生成します。
public override Element CreateElement()このウィンドウウィジェットを保持する未マウントのElement。
Of(IBuildContext)
Section titled “Of(IBuildContext)”最も近い祖先の WindowWidget を取得し、依存関係を登録します。
public static WindowWidget Of(IBuildContext context)パラメーター
Section titled “パラメーター”context IBuildContext
UpdateShouldNotify(InheritedWidget)
Section titled “UpdateShouldNotify(InheritedWidget)”ウィンドウ設定が更新前から変化したかを判定します。
public override bool UpdateShouldNotify(InheritedWidget oldWidget)パラメーター
Section titled “パラメーター”oldWidget InheritedWidget
更新前に同じElementが保持していたウィンドウウィジェット。
レコードとして等しくない場合はtrue。等しい場合はfalse。
trueを返すと、このウィンドウ設定に依存するElementへ再構築を要求します。