Vixen
dd8b0a81
csharp
public sealed class UiApplicationOptions

Everything an application says about itself before it has a window.

Read the guide page for this →

Remarks

Defaults that are answers rather than zeroes. Every property here has a value an application could ship with, so the shortest useful Main sets two of them — Title and Content — and gets a titled, resizable, correctly scaled window with the control theme installed, the utility classes loaded, a face found and eight shader stages wired.

⚠ Content is the one with no sensible default and it is deliberately not nullable-with-a-fallback. An application that forgets it would otherwise open an empty window and look like a renderer bug.

Fields and properties (18)

  • public string Title

    What the window is called.

  • public Int2 Size

    The window's size in device-independent pixels.

  • public bool IsResizable

    Whether the user may resize it.

  • public string Organisation

    Who the application belongs to, which is half of where its settings are kept.

  • public string Application

    What the application is called, which is the other half.

  • public Func<UiApplicationOptions, IPlatform>? Platform

    Where the window comes from, on a system SDL is not the answer for.

  • public Func<Component>? Content

    Builds the interface.

  • public Func<UiDocument, UiElement, Component>? Mount

    Puts the interface into the document, when something other than the default should.

  • public IList<string> Styles

    Stylesheets to load, in order, as author sheets.

  • public bool InstallControlTheme

    Whether the control set's own theme is installed under everything else.

  • public IList<string> RootClasses

    Classes to put on the document's root.

  • public Color4 Ground

    What the window is cleared to.

  • public bool InstallSystemFont

    Whether a face is borrowed from the operating system when none is registered.

  • public Action<UiDocument>? Configure

    Run once against the document, after the sheets and before the content is mounted.

  • public Action<UiApplication>? Started

    Run once, after the interface is built and before the first frame is pumped.

  • public Action<UiApplication, UiFrame>? Frame

    Run once a frame, after the events are pumped and before the document is updated.

  • public Action<UiApplication>? Stopping

    Run once, after the loop stops and while the document is still alive.

  • public int Frames

    How many frames to run before exiting, or zero for "until the window is closed".

Used by (8)

  • ProgramHelloUi
  • ColorSchemeWiringTestsVixen.Ui.Desktop.Tests
  • HotReloadSeamTestsVixen.Ui.Desktop.Tests
  • PlatformReachTestsVixen.Ui.Desktop.Tests
  • QuitRequestTestsVixen.Ui.Desktop.Tests
  • TextInputWiringTestsVixen.Ui.Desktop.Tests
  • UiApplicationVixen.Ui.Desktop
  • UiApplicationTestsVixen.Ui.Desktop.Tests