Class StyleManager
API for interacting with global styles throughout the UI.
Inherited Members
Namespace: Ritchie.Toolbox.VisualStyles
Assembly: Ritchie.Toolbox.dll
Syntax
public static class StyleManager
Methods
ClipVisual<TWidget, TVisualProperties>(GeometryHelper, TWidget)
Uses the current visual style to draw the given widget's clipping region. If the visual style does not support drawing the given widget (it doesn't implement IVisualRenderer<TVisualProperties>), then no clipping geometry will be drawn.
Declaration
public static void ClipVisual<TWidget, TVisualProperties>(this GeometryHelper geometryHelper, TWidget widget) where TWidget : Widget, IVisual<TVisualProperties> where TVisualProperties : struct
Parameters
Type | Name | Description |
---|---|---|
GeometryHelper | geometryHelper | The destination GeometryHelper to which geometry should be drawn. |
TWidget | widget | The widget to be drawn. Must implement IVisual<TVisualProperties>. |
Type Parameters
Name | Description |
---|---|
TWidget | Any type deriving Widget implementing IVisual<TVisualProperties>. |
TVisualProperties | Any value type. |
ClipVisual<TWidget, TVisual, TVisualProperties>(GeometryHelper, TWidget)
Declaration
public static void ClipVisual<TWidget, TVisual, TVisualProperties>(this GeometryHelper geometryHelper, TWidget widget) where TWidget : Widget, TVisual where TVisual : IVisual<TVisualProperties> where TVisualProperties : struct
Parameters
Type | Name | Description |
---|---|---|
GeometryHelper | geometryHelper | |
TWidget | widget |
Type Parameters
Name | Description |
---|---|
TWidget | |
TVisual | |
TVisualProperties |
DrawDefaultWidgetBackground(Widget, GeometryHelper, in BackgroundStyleProperties, in LayoutRect)
Declaration
public static void DrawDefaultWidgetBackground(Widget widget, GeometryHelper geometry, in Widget.BackgroundStyleProperties backgroundStyle, in LayoutRect contentRect)
Parameters
Type | Name | Description |
---|---|---|
Widget | widget | |
GeometryHelper | geometry | |
Widget.BackgroundStyleProperties | backgroundStyle | |
LayoutRect | contentRect |
DrawVisual<TWidget, TVisualProperties>(GeometryHelper, TWidget)
Uses the current visual style to draw the given widget. If the visual style does not support drawing the given widget (it doesn't implement IVisualRenderer<TVisualProperties>), then no geometry will be drawn.
Declaration
public static void DrawVisual<TWidget, TVisualProperties>(this GeometryHelper geometryHelper, TWidget widget) where TWidget : Widget, IVisual<TVisualProperties> where TVisualProperties : struct
Parameters
Type | Name | Description |
---|---|---|
GeometryHelper | geometryHelper | The destination GeometryHelper to which geometry should be drawn. |
TWidget | widget | The widget to be drawn. Must implement IVisual<TVisualProperties>. |
Type Parameters
Name | Description |
---|---|
TWidget | Any type deriving Widget implementing IVisual<TVisualProperties>. |
TVisualProperties | Any value type. |
DrawVisual<TWidget, TVisual, TVisualProperties>(GeometryHelper, TWidget)
Declaration
public static void DrawVisual<TWidget, TVisual, TVisualProperties>(this GeometryHelper geometryHelper, TWidget widget) where TWidget : Widget, TVisual where TVisual : IVisual<TVisualProperties> where TVisualProperties : struct
Parameters
Type | Name | Description |
---|---|---|
GeometryHelper | geometryHelper | |
TWidget | widget |
Type Parameters
Name | Description |
---|---|
TWidget | |
TVisual | |
TVisualProperties |
DrawWidgetBackground<TWidget>(GeometryHelper, TWidget, LayoutRect)
Declaration
public static void DrawWidgetBackground<TWidget>(this GeometryHelper geometry, TWidget widget, LayoutRect contentRect) where TWidget : Widget
Parameters
Type | Name | Description |
---|---|---|
GeometryHelper | geometry | |
TWidget | widget | |
LayoutRect | contentRect |
Type Parameters
Name | Description |
---|---|
TWidget |