HubWindow (WinUI Shell)¶
Assembly:
HubWindow
Namespace: HubWindow¶
App¶
WinUI 3 entry point for HubWindow; enforces single-instance startup, logging, and PMv2 DPI before any window is created.
Methods¶
App()¶
Initializes process-wide services, single-instance enforcement, logging, and dependency injection before UI launch.
GetXamlType(Type param0)¶
GetXamlType(Type)
GetXamlType(string param0)¶
GetXamlType(String)
GetXmlnsDefinitions()¶
GetXmlnsDefinitions()
InitializeComponent()¶
InitializeComponent()
OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)¶
Handles primary activation by applying theme resources, initializing the main window, and processing launch actions.
Parameters
args— Activation metadata supplied by the WinUI framework.
ReapplyThemeDictionariesForCurrentSystemTheme()¶
Reapplies theme resource dictionaries to keep UI in sync with system theme changes.
RequestAction(string action)¶
Requests that the application execute an action verb (same routing used by Jump List and IPC).
Parameters
action— Action verb, e.g.restore.
Propertys¶
Services¶
Service provider configured for HubWindow dependency resolution.
MainWindow¶
Primary HubWindow surface handling title bar customization, theme/DPI reactions, and tray bootstrapping.
Methods¶
ApplyScaffoldWindowHeightForVisibleRows(Microsoft.UI.Xaml.FrameworkElement param0, int param1)¶
Sizes the window height so it matches the current scaffold rows.
ApplyThemeToAssets(string param0)¶
Centralized: apply current (HC/Light/Dark) to icons + chrome.
Connect(int param0, object param1)¶
Connect()
CycleHubWindowTopPanelState()¶
Cycle the in-window HubWindow top-panel state (equivalent to clicking the HubWindow toggle button).
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
GetColorResource(string param0)¶
Helper to get Color from theme resources with fallback.
GetCurrentTheme()¶
Gets current effective theme, handling Default.
GetIconFileName(Microsoft.UI.Xaml.ElementTheme param0, string param1, int param2)¶
Chooses the right asset name based on HC + scheme or Light/Dark.
InitializeComponent()¶
InitializeComponent()
InitializeThemeSettings()¶
Must be called once after window handle exists.
InitializeTray()¶
Initializes the system tray icon. Should be called after the window is fully loaded.
IsHighContrastEnabled()¶
True if Windows High Contrast/Contrast Theme is ON.
IsHighContrastLightBackground()¶
When HC is on, detect if the system background is light (so choose dark glyph) or dark (choose light glyph).
MainWindow()¶
Constructs the main HubWindow shell and wires theme, DPI, and tray behaviors.
OnRootLoadedForScaffoldSizing(object param0, Microsoft.UI.Xaml.RoutedEventArgs param1)¶
One-time sizing pass: ensures the initial window matches the current fixed-height scaffold. Width constraints are enforced separately (WM_GETMINMAXINFO) but are also applied here.
RestoreWindow()¶
Restores HubWindow to the foreground and performs foreground activation handshakes.
ToggleWindowVisibility()¶
Toggles HubWindow visibility. When hidden or minimized, restores to foreground; otherwise hides.
TryResizeWindowForLeftRailPaneToggle(bool param0)¶
Resizes the outer window when the left rail pane opens/closes so the content region keeps a stable width.
Remarks
The left rail uses Microsoft.UI.Xaml.Controls.SplitView in CompactInline mode:
closing keeps the compact width (Microsoft.UI.Xaml.Controls.SplitView.CompactPaneLength), and opening uses
Microsoft.UI.Xaml.Controls.SplitView.OpenPaneLength. Without resizing the window, the content would reflow.
Program¶
Program class
Namespace: HubWindow.Controls¶
HubWindowToggleIcon¶
Icon-only glyph used by the top-panel expand/collapse button. Visual state is driven externally (HubWindowState0..4).
Methods¶
Connect(int param0, object param1)¶
Connect()
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
HubWindowToggleIcon()¶
Creates a new instance of the icon control.
InitializeComponent()¶
InitializeComponent()
Namespace: HubWindow.HubWindow_XamlTypeInfo¶
XamlMetaDataProvider¶
Main class for providing metadata for the app or library
Methods¶
GetXamlType(Type param0)¶
GetXamlType(Type)
GetXamlType(string param0)¶
GetXamlType(String)
GetXmlnsDefinitions()¶
GetXmlnsDefinitions()
Namespace: HubWindow.Interop¶
NativeMethods¶
Win32 interop surface for HubWindow, exposing tray, DPI, menu, and AppUserModelID helpers.
PerMonitorV2Scope¶
Temporarily sets the current thread to Per-Monitor-V2 DPI awareness while in scope.
WindowMessageMonitor¶
Monitors Win32 window messages via SetWindowLongPtr subclassing.
Events¶
WindowMessageReceived¶
Raised when the monitored window processes a message.
Methods¶
WindowMessageMonitor(IntPtr hwnd)¶
Subclasses the window represented by the provided handle to surface incoming messages.
Parameters
hwnd— Window handle to monitor.
Namespace: HubWindow.QuickSettings¶
ChatQuickSettingsWindow¶
Quick Settings window for chat routing defaults (non-secret preferences only).
Methods¶
ChatQuickSettingsWindow()¶
Initializes the window and loads persisted preferences.
Connect(int param0, object param1)¶
Connect()
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
InitializeComponent()¶
InitializeComponent()
ExtractStructuredTextQuickSettingsWindow¶
Quick Settings window for Smrt.ExtractStructuredText (non-secret preferences only).
Methods¶
Connect(int param0, object param1)¶
Connect()
ExtractStructuredTextQuickSettingsWindow()¶
Initializes the window and loads persisted preferences.
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
InitializeComponent()¶
InitializeComponent()
ExtractTextQuickSettingsWindow¶
Quick Settings window for Smrt.ExtractText (non-secret preferences only).
Methods¶
Connect(int param0, object param1)¶
Connect()
ExtractTextQuickSettingsWindow()¶
Initializes the window and loads persisted preferences.
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
InitializeComponent()¶
InitializeComponent()
Namespace: HubWindow.Services¶
DiagnosticsActions¶
Backend-only helpers to perform diagnostics actions that a future UI can call. No UI elements are created here.
Methods¶
ExportLogsHtml(bool autoOpen, int maxEntries)¶
Export a unified HTML log viewer covering all components. Returns the path (or empty if none).
Parameters
autoOpen— When true, launches the generated HTML viewer.maxEntries— Maximum log entries to include in the export.
Returns: Full path to the exported HTML viewer, or empty string when nothing was produced.
ExportRetentionEvidenceAsync(string outputRoot, Threading.CancellationToken ct)¶
Copy retention policy, legal hold, and verification artifacts into a timestamped export folder.
Parameters
outputRoot— Destination directory that will contain timestamped evidence folders.ct— Optional cancellation token for manifest writes.
Returns: Full path to the export folder, or empty when no evidence was copied.
RunSmrtSupportPresetAsync(string outputDir, Smrt.SupportBundle.Models.SmrtSupportPreset preset, Threading.CancellationToken ct)¶
Runs a SmrtSupport preset export and launches its primary review report on success.
Parameters
outputDir— Destination directory for the preset bundle.preset— Preset to execute.ct— Optional cancellation token.
Returns: Full path to the generated bundle when successful; empty string otherwise.
HubWindowSnapshot¶
Immutable snapshot of HubWindow Bars0–2 state.
Remarks
This model is produced by HubWindow.Services.HubWindowSnapshotClient from the python-net GET /source
payload. It contains both display-ready fields (source name/path/clipboard) and optional raw dictionaries
for forward-compatible diagnostics.
Methods¶
HubWindowSnapshot(string param0, string param1, string param2, string param3, string param4, Collections.Generic.IReadOnlyList> param5, Collections.Generic.Dictionary param6, Collections.Generic.Dictionary param7, Collections.Generic.Dictionary param8, Collections.Generic.Dictionary param9, string param10, string param11, DateTimeOffset param12)¶
Immutable snapshot of HubWindow Bars0–2 state.
Remarks
This model is produced by HubWindow.Services.HubWindowSnapshotClient from the python-net GET /source
payload. It contains both display-ready fields (source name/path/clipboard) and optional raw dictionaries
for forward-compatible diagnostics.
HubWindowSnapshotClient¶
Best-effort polling client for the local python-net HubWindow snapshot endpoint (GET /source).
Remarks
The upstream payload is intentionally additive:
- Legacy keys: lblSourceName, lblPath, clipboardFragments
- Additive keys: sourceType, sourceData, appIdentity, etc.
This client consumes either form so HubWindow remains resilient across versions.
Methods¶
TryGetSnapshotAsync(Threading.CancellationToken cancellationToken)¶
Attempts to fetch and parse the current HubWindow snapshot.
Parameters
cancellationToken— Cancellation token for the request and parsing.
Returns: A snapshot if available; otherwise null (best-effort).
Propertys¶
PollInterval¶
Poll interval used by the HubWindow snapshot loop.
ITrayController¶
Abstraction for actions triggered from the system tray UI. Decouples tray UI from window/app implementation and enables DI/MVVM wiring.
Methods¶
ExitSmrtHub()¶
Initiate the SmrtHub shutdown workflow via Supervisor.
RequestAction(string action)¶
Request an application action verb (same routing as Jump List/title-bar search/IPC).
Parameters
action— Action verb, e.g.extract-clipboard-text.
RestoreWindow()¶
Request that the HubWindow surface be restored to the foreground.
ITrayControllerFactory¶
Creates tray controller instances scoped to a HubWindow.
Methods¶
Create(HubWindow.MainWindow window)¶
Builds a controller that proxies tray commands back to the given window.
Parameters
window— Primary window associated with the tray icon.
Returns: A ready-to-use tray controller.
OcrTextService¶
HubWindow integration service for OCR text extraction. This is headless (no UI) and is intended to be invoked by future trigger surfaces (tray, Jump List, search index, etc.).
Remarks
Privacy and operational data policy: - Do not log OCR payload bytes. - Do not log extracted text.
SettingsHostIpcClient¶
No summary available.
Methods¶
TryGetSmrtSpaceSnapshotAsync(int timeoutMs, Threading.CancellationToken cancellationToken)¶
Requests the SmrtSpace catalog and active selection snapshot from Settings Host.
Parameters
timeoutMs— Timeout in milliseconds for the IPC request.cancellationToken— Cancellation token for the request.
Returns: Snapshot result with connection and payload details.
SupervisorControlClient¶
Client for communicating with SmrtHub Supervisor control server. Uses a per-user named pipe restricted to the current user.
Methods¶
RequestRestartAsync(string componentId, TimeSpan timeout)¶
Request a restart of a component by ID (will also start if not running, per Supervisor semantics).
Parameters
componentId— Component identifier understood by Supervisor.timeout— Maximum time to wait for the control pipe connection.
Returns: true when the Supervisor acknowledged the restart request; otherwise false.
RequestShutdownAsync(TimeSpan timeout)¶
Request a graceful shutdown of the Supervisor. Returns true if the request was sent and acknowledged.
Parameters
timeout— Maximum time to wait for the control pipe connection.
Returns: true when the Supervisor accepted the shutdown request; otherwise false.
TryParseResponse(string param0, Boolean@ param1)¶
Parse Supervisor JSON response: {"ok":true,...} or {"ok":false,...}
SystemTrayService¶
Manages the system tray icon for HubWindow with theme-aware icon switching. Left-click restores the window; right-click shows a context menu.
Methods¶
Initialize(Microsoft.UI.Xaml.ElementTheme theme, string iconPath)¶
Initializes the system tray icon with theme-aware icon selection. Call this after the window is created.
Parameters
theme— Initial theme used to pick the correct icon assets.iconPath— Optional override path for the icon to load.
ProcessTrayMessage(uint lParam)¶
Processes tray icon messages. Should be called from the window's message pump.
Parameters
lParam— Message identifier from the tray callback.
RefreshForDpi()¶
Refreshes the tray icon for the current DPI (e.g., after WM_DPICHANGED) without changing theme.
UpdateTheme(Microsoft.UI.Xaml.ElementTheme theme)¶
Updates the tray icon to match the current theme with debouncing to prevent thrashing.
Parameters
theme— The requested window theme to reflect in the tray icon.
TrayController¶
Default implementation of ITrayController for HubWindow.
Methods¶
ExitSmrtHub()¶
Initiates the SmrtHub shutdown workflow via Supervisor.
RestoreWindow()¶
Restores the HubWindow surface when the tray icon requests it.
TrayController(HubWindow.MainWindow window, Smrt.Notifications.INotificationService notifications)¶
Creates a controller bound to a HubWindow instance and optional notification publisher.
Parameters
window— Primary HubWindow surface.notifications— Optional notification sink for shutdown messaging.
TrayControllerFactory¶
Resolves tray controller dependencies from the HubWindow service provider.
Methods¶
Create(HubWindow.MainWindow window)¶
Creates a tray controller backed by the application DI container.
Parameters
window— HubWindow instance that receives tray commands.
Returns: A tray controller with notification publishing wired if available.
Namespace: HubWindow.ServicesUtilities¶
JumpListService¶
Creates a Windows Jump List (taskbar right-click menu) with app tasks. Implemented with minimal COM interop to avoid extra dependencies.
Methods¶
CreateShellLink(string exe, string workingDir, string args, string title, string tooltip)¶
Builds a shell link targeting the HubWindow executable with the provided command line and metadata.
Parameters
exe— Absolute path to the HubWindow executable.workingDir— Working directory to set on the link.args— Command-line arguments passed to HubWindow when task is invoked.title— Display name rendered in the Jump List.tooltip— Tooltip shown when hovering the Jump List item.
Returns: A COM shell link instance ready to be added to the Jump List.
TryBuildDefaultJumpList()¶
Builds the HubWindow Jump List with the standard SmrtHub tasks. Failures are logged and ignored.
SingleInstanceIpc¶
Minimal per-user named pipe IPC so secondary launches (e.g., from Jump List) can ask the primary instance to perform actions without starting a second UI.
Methods¶
Dispose()¶
Stops the server loop and releases resources.
SingleInstanceIpc(Func onMessage)¶
Creates a per-user IPC router for secondary process notifications.
Parameters
onMessage— Delegate invoked when a message arrives from a client.
Start()¶
Starts the background server loop. Safe to call once per process.
TrySend(string message, int timeoutMs)¶
Attempts to deliver a message to the primary instance via named pipe.
Parameters
message— Payload to send to the server.timeoutMs— Timeout in milliseconds for connecting/sending.
Returns: true when the message was dispatched; otherwise false.
Namespace: HubWindow.SmrtSpace¶
SmrtSpaceCreateWindow¶
Create New SmrtSpace window (HubWindow-owned UI).
Methods¶
Connect(int param0, object param1)¶
Connect()
GetBindingConnector(int param0, object param1)¶
GetBindingConnector(int connectionId, object target)
InitializeComponent()¶
InitializeComponent()
SmrtSpaceCreateWindow()¶
Initializes the window and loads default values.
Namespace: HubWindow.ViewModels¶
ClipboardFragmentViewModel¶
View model for a single clipboard fragment rendered in HubWindow row B2.
MainWindowViewModel¶
View model for the HubWindow shell.
Remarks
Responsibilities: - Exposes command bindings for tray-driven actions. - Surfaces the Bars0–2 fields bound by the HubWindow scaffold. - Provides best-effort, UI-only user profile fields for the title bar (friendly name, email/UPN, initials, and an optional profile picture).
Privacy note: do not log or persist user identity values from this view model.
Debug-only: the environment variable ``SMRTHUB_HUBWINDOW_DEBUG_PROFILE_BLOCK`` can be used to simulate missing
profile fields for UI testing without modifying the Windows account.
Fields¶
DebugProfileBlockEnvVar¶
DEBUG-only test hook for title bar user profile rendering.
Remarks
Comma/semicolon/space-separated values: picture, initials, name.
When set, the view model clears the specified fields to exercise the Microsoft.UI.Xaml.Controls.PersonPicture fallback chain.
Methods¶
MainWindowViewModel(HubWindow.Services.ITrayController controller, Smrt.UI.Services.BusyState busy)¶
Creates the view model bound to the provided tray controller.
Parameters
controller— Controller used to route command invocations.busy— Shared busy state used by Row3 indicators.
Propertys¶
Bar0IsLocal¶
True when the current source type is local (shows Apps icon).
Bar0IsOther¶
True when the current source type is neither web nor local (shows Warning icon).
Bar0IsWeb¶
True when the current source type is web (shows Globe icon).
Bar0Symbol¶
Row A0 icon (web/app indicator).
Bar0Text¶
Row B0 (source name) text.
Bar1Symbol¶
Row A1 icon (path indicator).
Bar1Text¶
Row B1 (source path) text.
Bar2Image¶
Optional thumbnail for the first clipboard image fragment (row B2).
Bar2ImageVisibility¶
Visibility helper for binding the clipboard image thumbnail.
Bar2Symbol¶
Row A2 icon (clipboard indicator).
Bar2Text¶
Row B2 (clipboard preview) text.
Bar2ToolTip¶
Tooltip for clipboard preview (full text).
Bar3DetectedConfidence¶
Detected filetype confidence for the current clipboard text fragment (best-effort).
Bar3DetectedExtension¶
Detected file extension for the current clipboard text fragment (best-effort).
Bar3DetectedGroup¶
Detected filetype group for the current clipboard text fragment (best-effort).
Bar3DetectedTypeId¶
Detected filetype ID for the current clipboard text fragment (best-effort).
Bar3EmbeddedFilename¶
Embedded filename detected at the start of a clipboard text fragment (best-effort).
Bar3HasDetectedFiletype¶
True when filetype detection metadata is present for the current clipboard text fragment.
Bar3HasEmbeddedFilename¶
True when an embedded filename was detected for the current clipboard text fragment.
Busy¶
Shared busy state used by Row3 indicators.
ClipboardFragments¶
Expanded clipboard fragments (text + images) rendered in row B2.
CurrentUserAccountUri¶
Placeholder account link target for the profile flyout.
CurrentUserCloudLabel¶
Best-effort cloud/tenant label shown in the profile flyout header (e.g., the UPN domain).
CurrentUserDisplayName¶
Display name for the signed-in Windows user (best-effort).
CurrentUserEmailOrUpn¶
Email address or UPN for the signed-in user when available (best-effort).
Remarks
Windows does not always expose an email/UPN (common for local accounts), and some environments provide values
with prefixes such as MicrosoftAccount\ or AzureAD\. This value is normalized before display.
CurrentUserFirstName¶
First name (or friendly short name) for the signed-in user.
CurrentUserInitials¶
Initials derived from the signed-in user (fallback when no picture is available).
CurrentUserPicture¶
Profile image for the signed-in user, if available.
ExitCommand¶
Command that routes to SmrtHub shutdown.
HasCurrentUserCloudLabel¶
True when HubWindow.ViewModels.MainWindowViewModel.CurrentUserCloudLabel is populated.
HasCurrentUserEmail¶
True when HubWindow.ViewModels.MainWindowViewModel.CurrentUserEmailOrUpn is populated.
HasCurrentUserPicture¶
True when HubWindow.ViewModels.MainWindowViewModel.CurrentUserPicture is available (i.e., not relying on initials/glyph fallback).
IsLeftRailPaneOpen¶
True when the HubWindow left rail pane is expanded to show labels.
Remarks
This controls the WinUI SplitView.IsPaneOpen state for the compact-inline left rail. The pane does not
provide navigation; it only reveals labels alongside the existing iconography.
The window shell resizes when this value changes so the main content region keeps a stable width (opening the
pane widens the window instead of shrinking/reflowing the content).
RestoreCommand¶
Command that restores the HubWindow surface.
ShowProfileFlyoutLogo¶
True when the flyout should show the SmrtHub logo instead of a cloud label.
ToggleLeftRailPaneCommand¶
Command that toggles the left rail pane between compact (icons-only) and expanded (icons + labels) modes.
Namespace: Microsoft.WindowsAppSDK¶
Release¶
No summary available.
Fields¶
Channel¶
No summary provided.
FormattedVersionShortTag¶
No summary provided.
FormattedVersionTag¶
No summary provided.
Major¶
No summary provided.
MajorMinor¶
No summary provided.
Minor¶
No summary provided.
Patch¶
No summary provided.
VersionShortTag¶
No summary provided.
VersionTag¶
No summary provided.
Namespace: Microsoft.WindowsAppSDK.Runtime¶
Identity¶
No summary available.
Fields¶
Publisher¶
No summary provided.
PublisherId¶
No summary provided.
Version¶
No summary available.
Fields¶
Build¶
No summary provided.
DotQuadString¶
No summary provided.
Major¶
No summary provided.
Minor¶
No summary provided.
Revision¶
No summary provided.
UInt64¶
No summary provided.
Namespace: Microsoft.WindowsAppSDK.Runtime.Packages¶
Framework¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.
Main¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.
Singleton¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.
Namespace: Microsoft.WindowsAppSDK.Runtime.Packages.DDLM¶
Arm64¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.
X64¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.
X86¶
No summary available.
Fields¶
PackageFamilyName¶
No summary provided.