Code/ThemeInjectionMode.cs
namespace BetterUI;

/// <summary>
/// The mode of theme injection.
/// </summary>
/// <remarks>
/// Theme injection is the process of automatically passing the theme to all children
/// of this panel. This enum specifies the mode of theme injection.
/// </remarks>
public enum ThemeInjectionMode
{
	/// <summary>
	/// The theme injection is controlled manually. This is the default value.
	/// </summary>
	/// <remarks>
	/// This option is the most efficient as it does not need to traverse the entire tree of the panel.
	/// When the theme injection mode is set to manual, the theme will not be automatically injected into children.
	/// Instead, you need to use <see cref="ThemePanel"/> instead of a <see cref="Panel"/> to manually inject the theme.
	/// </remarks>
	Manual,
	
	/// <summary>
	/// Inject the theme only into direct children of this panel.
	/// </summary>
	/// <remarks>
	/// This option is one of the most efficient as it only needs to traverse the direct children of the panel.
	/// It is recommended to use this option unless you have a need to inject the theme into all descendents.
	/// </remarks>
	Direct,

	/// <summary>
	/// Recursively inject the theme into all descendents of this panel that have a <see cref="InjectThemeAttribute"/>.
	/// <remarks>
	/// This option is the most aggressive as it needs to traverse the entire tree of the panel.
	/// It can have a huge performance impact if the panel has a large number of descendents.
	/// </remarks>
	/// </summary>
	Descendents,
}