Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.WindowFramePositionDrawer Class Reference

Editor UI Toolkit nine-position grid for serialized WindowFramePosition values. More...

Inheritance diagram for GWG.WindowFramework.WindowFramePositionDrawer:
Collaboration diagram for GWG.WindowFramework.WindowFramePositionDrawer:

Public Member Functions

override VisualElement CreatePropertyGUI (SerializedProperty property)
 Builds the descriptive label and position grid for the supplied serialized enum.

Private Member Functions

void CreateGrid (VisualElement gridContainer, SerializedProperty property)
Button CreatePositionButton (string labelText, int index, int currentValue, SerializedProperty property)
void UpdateAllButtonStyles (VisualElement gridContainer, int selectedIndex)
void UpdateButtonStyle (Button button, bool isSelected)

Static Private Attributes

const string description
static readonly string[] labels

Detailed Description

Editor UI Toolkit nine-position grid for serialized WindowFramePosition values.

Writes the enum index and applies serialized modifications on click. This changes configured opening position, not a live window Transform or current remembered geometry. Grid ordering assumes the first nine enum values match top-left through bottom-right. Editor styling uses WindowFrameworkConstants.EditorThemePath; not the application palette.

Member Function Documentation

◆ CreateGrid()

void GWG.WindowFramework.WindowFramePositionDrawer.CreateGrid ( VisualElement gridContainer,
SerializedProperty property )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreatePositionButton()

Button GWG.WindowFramework.WindowFramePositionDrawer.CreatePositionButton ( string labelText,
int index,
int currentValue,
SerializedProperty property )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreatePropertyGUI()

override VisualElement GWG.WindowFramework.WindowFramePositionDrawer.CreatePropertyGUI ( SerializedProperty property)
inline

Builds the descriptive label and position grid for the supplied serialized enum.

Parameters
propertyLive nonnull serialized WindowFramePosition property.
Returns
Editor-owned subtree; no runtime window is constructed or mounted.
Here is the call graph for this function:

◆ UpdateAllButtonStyles()

void GWG.WindowFramework.WindowFramePositionDrawer.UpdateAllButtonStyles ( VisualElement gridContainer,
int selectedIndex )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateButtonStyle()

void GWG.WindowFramework.WindowFramePositionDrawer.UpdateButtonStyle ( Button button,
bool isSelected )
inlineprivate
Here is the caller graph for this function:

Field Documentation

◆ description

const string GWG.WindowFramework.WindowFramePositionDrawer.description
staticprivate
Initial value:
= "Initial Position:\n" +
"Select the initial window position.\n" +
"This is only the initial anchor point, " +
"the window can be moved after opening unless locked"

◆ labels

readonly string [] GWG.WindowFramework.WindowFramePositionDrawer.labels
staticprivate
Initial value:
=
{
"↖",
"↑",
"↗",
"←",
"•",
"→",
"↙",
"↓",
"↘"
}