| | | 1 | | namespace Allyaria.Theming.Helpers; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents a basic style application utility that creates a single <see cref="ThemeUpdater" /> for a specified |
| | | 5 | | /// <see cref="StyleType" /> and applies it to a component within the theme structure. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <remarks> |
| | | 8 | | /// <para> |
| | | 9 | | /// The <see cref="ThemeApplier" /> is a concrete implementation of <see cref="ThemeApplierBase" />. It provides a |
| | | 10 | | /// simplified entry point for applying a single style type—such as margin, padding, or color—to a particular |
| | | 11 | | /// <see cref="ComponentType" />. |
| | | 12 | | /// </para> |
| | | 13 | | /// <para> |
| | | 14 | | /// This class is commonly used during theme construction in <see cref="ThemeBuilder" /> to apply foundational style |
| | | 15 | | /// such as layout spacing and element sizing. |
| | | 16 | | /// </para> |
| | | 17 | | /// </remarks> |
| | | 18 | | internal sealed class ThemeApplier : ThemeApplierBase |
| | | 19 | | { |
| | | 20 | | /// <summary> |
| | | 21 | | /// Initializes a new instance of the <see cref="ThemeApplier" /> class, creating a <see cref="ThemeUpdater" /> for |
| | | 22 | | /// specified style type and value. |
| | | 23 | | /// </summary> |
| | | 24 | | /// <param name="themeMapper">The <see cref="ThemeMapper" /> instance used for theme mapping operations.</param> |
| | | 25 | | /// <param name="isHighContrast">Specifies whether this applier operates in high-contrast mode.</param> |
| | | 26 | | /// <param name="componentType">The <see cref="ComponentType" /> to which this style applies.</param> |
| | | 27 | | /// <param name="styleType">The <see cref="StyleType" /> representing the style to be applied.</param> |
| | | 28 | | /// <param name="value">The <see cref="IStyleValue" /> representing the style’s assigned value.</param> |
| | | 29 | | public ThemeApplier(ThemeMapper themeMapper, |
| | | 30 | | bool isHighContrast, |
| | | 31 | | ComponentType componentType, |
| | | 32 | | StyleType styleType, |
| | | 33 | | IStyleValue value) |
| | 196 | 34 | | : base(themeMapper: themeMapper, isHighContrast: isHighContrast, componentType: componentType) |
| | 196 | 35 | | => Add(item: CreateUpdater(styleType: styleType, value: value)); |
| | | 36 | | } |