Skip to content

Settings Panel API

RoyalApps.RoyalTerminal.Avalonia.Settings exposes the reusable settings surface used by the app shell. The package is for hosts that want to edit RoyalTerminal session profiles without adopting the complete product window.

The settings panel edits state and durable profile data. It does not start transports directly and it does not require the app-shell package.

Public Controls

TypePurpose
TerminalSettingsPanelRoot settings host control.
TerminalSettingsSessionPanelSession name and transport mode editor.
TerminalSettingsConnectionPanelWorking directory, PTY, pipe, raw TCP, Telnet, serial, and base SSH endpoint editor.
TerminalSettingsTerminalPanelTerminal behavior editor.
TerminalSettingsAppearancePanelFont, opacity, scroll, and regex text highlighting editor.
TerminalSettingsSshPanelSSH auth, host-key trust, proxy, forwarding, X11, keep-alive, and timeout editor.
TerminalSettingsLoggingPanelSession logging and event logging editor.

Include the resource dictionary in your executable or library host:

xml
<Application.Styles>
  <FluentTheme />
  <StyleInclude Source="avares://RoyalTerminal.Avalonia.Settings/Settings/TerminalSettingsPanel.axaml" />
</Application.Styles>

Then host the root panel:

xml
<settings:TerminalSettingsPanel
    State="{Binding SettingsPanelState}" />

Public State Model

TypePurpose
TerminalSettingsPanelStateCentral state owner for profile selection, profile CRUD, category selection, dirty state, and status text.
TerminalSettingsCategoryStateBaseBase type for category-specific state.
TerminalSettingsSessionStateSession name and transport mode state.
TerminalSettingsConnectionStateLocal and remote connection state.
TerminalSettingsTerminalBehaviorStateCopy, bell, paste, shaping, ligature, and terminal behavior state.
TerminalSettingsAppearanceStateFont, opacity, scrollback, and text highlighting state.
TerminalSettingsSshStateSSH authentication, trust, proxy, port forwarding, X11, and timeout state.
TerminalSettingsLoggingStateSession logging and event-log state.
TerminalSettingsHighlightRuleStateEditable regex highlighting rule state.

Option records exposed by the package:

TypePurpose
TerminalSettingsProfileItemProfile picker entry.
TerminalSettingsTransportModeOptionTransport picker entry.
TerminalSettingsFontSourceOptionFont source picker entry.
TerminalSettingsFontEdgingOptionFont edging picker entry.
TerminalSettingsFontHintingOptionFont hinting picker entry.
TerminalSettingsTextHighlightingModeOptionRegex highlighting mode picker entry.
TerminalSettingsSshAuthModeOptionSSH authentication mode picker entry.

Data Flow

The settings state is intentionally UI-facing. Hosts should map between the state object and durable profile documents:

  1. Load TerminalSessionProfilesDocument from a store.
  2. Populate TerminalSettingsPanelState.
  3. Let the user edit settings state.
  4. Validate and normalize through TerminalSessionProfileSerializer.
  5. Save the updated profile document.
  6. Start or restart sessions using TerminalSessionProfileMapper.

The reusable app shell already does this mapping for its own settings overlay. Custom hosts can use the same state objects without adopting MainWindow.

Relationship To Runtime Profiles

Durable profile records live in RoyalApps.RoyalTerminal.Terminal:

  • TerminalSessionProfile;
  • TerminalSessionTransportProfile;
  • TerminalSessionAppearanceSettings;
  • TerminalSessionBehaviorSettings;
  • TerminalSessionLoggingSettings;
  • TerminalSessionTextHighlightRule.

The settings panel state mirrors those profile fields for editing, but it stays separate from runtime session services. This keeps the UI reusable and avoids transport-specific logic in the control templates.

MIT Licensed