Window Framework v1.2.4
Window Framework for Unity UI Toolkit
Loading...
Searching...
No Matches
GWG.WindowFramework Namespace Reference

Primary namespace for the Window Framework Asset. More...

Namespaces

namespace  Demo
 Primary namespace for all demo items and scripts in the asset.
namespace  Editor
 Primary namespace for the Window Framework Assets editor functions.
namespace  Experimental
 Primary namespace for new items that are still in testing.
namespace  FormElements
 Primary namespace for all form elements in the asset.
namespace  Manipulators
 Primary namespace for all manipulators in the asset.

Classes

class  ContextMenuConfig
 Configuration class for a runtime context menu. More...
class  ContextMenuItem
 Used to define the items that will be displayed in the context menu. More...
class  Extensions
class  TooltipStrings
 TooltipStrings is a static class that provides a collection of constant strings. These strings are used as a tooltip for various UI fields and elements within the window framework editor UI. The tooltips provide a shared location for descriptive information to guide users in understanding the purpose of specific fields or actions without having to clutter the code with reused text. More...
class  WindowFrame
 Represents a customizable window frame for UI elements in Unity. Provides functionality for resizing, moving, locking, and saving window state. Includes support for themes, tooltips, and context menus. More...
class  WindowFrameContextMenu
 A sophisticated context menu implementation for the Window Framework that provides dynamic menu creation with fade animations and intelligent positioning. More...
class  WindowFrameController
 The WindowFrameController is the central management component for the Window Framework system. It serves as a singleton that manages window frames, themes, tooltips, context menus, and persistent data. More...
class  WindowFrameData
 Represents the serializable data structure for storing and loading window frame configuration and state information. This class contains all the essential properties needed to persist window settings between application sessions. More...
class  WindowFrameDataEntry
 Represents a key-value pair entry for window frame data storage, designed for serialization compatibility. More...
class  WindowFramePositionDrawer
class  WindowFrameSettingsView
 Represents the settings view for the Window Framework. Provides UI controls for adjusting framework settings such as context menu and tooltip behavior, as well as theme management. This view is designed to be used at runtime and can be extended to suit specific project requirements. More...
class  WindowFrameTheme
class  WindowFrameThemeData
 Represents a theme data asset for configuring and managing window frame themes in the Window Framework system. This class is a ScriptableObject that provides functionality for managing themes, tracking the active theme, and applying changes to the window frame styles. More...
class  WindowFrameThemeList
class  WindowFrameTooltip
 Represents a tooltip element that displays contextual information for UI elements. The tooltip can be styled dynamically based on the current theme and supports fade-in and fade-out animations. More...
class  WindowFrameworkData
 Represents the configuration and runtime data for the Window Framework system, enabling management of UI-related settings such as tooltips, context menus, and theme preferences. More...

Enumerations

enum  GlobalsLoadOrder { First , Last }
 Specifies the load order for the global stylesheet within the Window Framework. It determines whether the global stylesheet is applied before or after theme-specific stylesheets. More...
enum  ThemeApplyMethods { WindowsFramesOnly , ParentPanel , AllPanels }
 Specifies the method used to apply themes within the window framework system. Determines the level or scope of the theme application, allowing themes to be applied selectively to window frames, parent panels, or all available panels. More...
enum  TooltipFadeType { FadeOut , FadeIn , FadeInAndOut , None }
 Defines the fade animation behavior for tooltips. More...
enum  WindowFramePosition {
  TopLeft , Top , TopRight , Left ,
  Center , Right , BottomLeft , Bottom ,
  BottomRight
}
 Enumeration defining predefined positioning options for window frames within the screen space. More...

Detailed Description

The GWG.WindowFramework namespace is used as the primary namespace for the asset, this keeps all of our code independent of other assets to help with any possible compatability issues

< Primary Namespace for the Window Framework Asset

Enumeration Type Documentation

◆ GlobalsLoadOrder

This enumeration controls the CSS cascade order, which affects how styles are applied and resolved:

  • First: Global styles are applied first, then theme styles (theme styles take precedence)
  • Last: Theme styles are applied first, then global styles (global styles take precedence)
// Set global styles to load last (highest specificity)
windowFrameController.GlobalsLoadOrder = GlobalsLoadOrder.Last;
GlobalsLoadOrder
Specifies the load order for the global stylesheet within the Window Framework. It determines whether...
Definition WindowFrameController.cs:28
Enumerator
First 

Global stylesheet loads first in the cascade order. Theme stylesheets will override global styles where there are conflicts.

Last 

Global stylesheet loads last in the cascade order. Global styles will override theme stylesheets where there are conflicts.

◆ ThemeApplyMethods

This enumeration provides flexibility in theme application, allowing developers to control exactly which UI elements receive theme styling. The different application methods enable fine-grained control over the visual consistency and performance of theme changes.

Performance Considerations:
Different application methods have varying performance implications:

  • WindowsFramesOnly - Most efficient, affects only window frames
  • ParentPanel - Moderate performance impact, affects the main UI document panel
  • AllPanels - Highest performance cost, affects all panels in the scene
// Apply theme only to window frames for best performance
themeData.ThemeApplyMethod = ThemeApplyMethods.WindowsFramesOnly;
// Apply theme to parent panel for broader styling
themeData.ThemeApplyMethod = ThemeApplyMethods.ParentPanel;
// Apply theme to all panels for complete visual consistency
themeData.ThemeApplyMethod = ThemeApplyMethods.AllPanels;
// Dynamic selection based on performance requirements
if (QualitySettings.GetQualityLevel() >= 3)
{
themeData.ThemeApplyMethod = ThemeApplyMethods.AllPanels;
}
else
{
themeData.ThemeApplyMethod = ThemeApplyMethods.WindowsFramesOnly;
}
ThemeApplyMethods
Specifies the method used to apply themes within the window framework system. Determines the level or...
Definition WindowFrameThemeData.cs:67
  • WindowsFramesOnly - Applies the theme to all window frames in the scene.
  • ParentPanel - Applies the theme to the panel of the Ui Document used by the framework.
  • AllPanels - Applies the theme to all UI panels in the scene.
Enumerator
WindowsFramesOnly 

Applies the theme to all window frames in the scene.

ParentPanel 

Apples the theme to the panel used by the UI document assigned to the Window Frame Controller

AllPanels 

Applies the theme to all panel in the scene

◆ TooltipFadeType

This enumeration controls how tooltips appear and disappear, allowing for different visual effects based on user preferences and UI design requirements. The fade behavior affects both the appearance timing and visual smoothness of tooltip transitions.

// Configure tooltip fade behavior
WindowFrameController.Instance.TooltipFadeType = TooltipFadeType.FadeInAndOut;
// Different fade types provide different user experiences:
// FadeOut: Instant appearance, smooth disappearance
// FadeIn: Smooth appearance, instant disappearance
// FadeInAndOut: Smooth both directions
// None: Instant appearance and disappearance
TooltipFadeType
Defines the fade animation behavior for tooltips.
Definition WindowFrameTooltip.cs:30
Enumerator
FadeOut 

Tooltip appears instantly and fades out when hidden. Provides immediate information display with graceful dismissal.

FadeIn 

Tooltip fades in when shown and disappears instantly when hidden. Provides smooth appearance with immediate dismissal.

FadeInAndOut 

Tooltip fades in when shown and fades out when hidden. Provides the smoothest visual experience with gradual transitions.

None 

Tooltip appears and disappears instantly without any fade animation. Provides immediate feedback with no transition delays.

◆ WindowFramePosition

This enumeration provides standardized window positioning options that cover common placement scenarios. Positions are calculated relative to screen dimensions and window size for consistent behavior.

// Position window in center of screen
myWindow.StartPosition = WindowFramePosition.Center;
// Position in top-right corner
myWindow.StartPosition = WindowFramePosition.TopRight;
WindowFramePosition
Enumeration defining predefined positioning options for window frames within the screen space.
Definition WindowFrame.cs:32
Enumerator
TopLeft 

Specifies that the window frame should be positioned at the top-left corner of the screen.

The TopLeft position places the window's top-left corner flush with the top and left edges of the screen. This is typically used to align a window in the uppermost corner of the display space.

Top 

Specifies that the window frame should be positioned at the top center of the screen.

The Top position places the window's top edge centrally aligned with the horizontal middle of the screen. This is often used to position a window prominently along the upper section of the display space.

TopRight 

Specifies that the window frame should be positioned at the top-right corner of the screen.

The TopRight position aligns the window's top-right corner with the top and right edges of the display screen. This is commonly used to position a window in the uppermost corner on the right side of the screen.

Left 

Specifies that the window frame should be positioned along the left edge of the screen.

The Left position aligns the window's vertical center with the screen's vertical midpoint, placing it flush against the left edge of the screen. This is typically used to anchor windows for workflows that prioritize left-aligned layouts.

Center 

Specifies that the window frame should be positioned at the center of the screen.

The Center position places the window's frame equidistant from all edges of the screen, aligning its center point with the screen's center point. This is often used to make the window prominent and centrally located.

Right 

Specifies that the window frame should be positioned at the right side of the screen.

The Right position ensures the window is aligned flush with the right edge of the screen, maintaining vertical positioning based on the window's height. This setting is commonly used to anchor a window along the right-hand side of the display space.

BottomLeft 

Specifies that the window frame should be positioned at the bottom-left corner of the screen.

The BottomLeft position places the window's bottom-left corner flush with the bottom and left edges of the screen. This is typically used to align a window in the lower-left corner of the display space.

Bottom 

Specifies that the window frame should be positioned at the bottom-center of the screen.

The Bottom position aligns the window's bottom edge with the bottom-center of the display space. This is often used to position a window symmetrically along the lower boundary of the screen.

BottomRight 

Specifies that the window frame should be positioned at the bottom-right corner of the screen.

The BottomRight position aligns the window's bottom-right corner flush with the bottom and right edges of the screen. It is commonly used to place a window in the lowermost corner of the display area.