2023-09-24 17:26:46 -04:00
|
|
|
|
using System.Drawing;
|
2017-11-27 13:11:20 -05:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
namespace Vanara.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
/// <summary>Style used to render the theme.</summary>
|
|
|
|
|
public enum RenderStyle
|
2017-11-27 13:11:20 -05:00
|
|
|
|
{
|
2023-03-31 11:47:53 -04:00
|
|
|
|
/// <summary>The system theme</summary>
|
|
|
|
|
SystemTheme,
|
2020-04-02 23:59:18 -04:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
/// <summary>A custom theme.</summary>
|
|
|
|
|
Custom
|
|
|
|
|
}
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
/// <summary>An interface for controls that provide drawing styles.</summary>
|
|
|
|
|
/// <typeparam name="TCtrl">The type of the control.</typeparam>
|
|
|
|
|
/// <typeparam name="TEnum">The type of the enum.</typeparam>
|
|
|
|
|
public interface IDrawingStyle<in TCtrl, in TEnum> where TEnum : struct, IConvertible where TCtrl : Control
|
|
|
|
|
{
|
|
|
|
|
/// <summary>Draws the specified control.</summary>
|
|
|
|
|
/// <param name="ctrl">The control.</param>
|
|
|
|
|
/// <param name="state">The state.</param>
|
|
|
|
|
/// <param name="e">The <see cref="PaintEventArgs"/> instance containing the event data.</param>
|
|
|
|
|
void Draw(TCtrl ctrl, TEnum state, PaintEventArgs e);
|
2020-04-02 23:59:18 -04:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
/// <summary>Measures the specified control.</summary>
|
|
|
|
|
/// <param name="ctrl">The control.</param>
|
|
|
|
|
/// <param name="state">The state.</param>
|
|
|
|
|
/// <param name="g">The g.</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Size Measure(TCtrl ctrl, TEnum state, Graphics g = null);
|
2020-04-02 23:59:18 -04:00
|
|
|
|
}
|