mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-03 15:49:26 +03:00
Moved classes out of subfolders. Moved enums to be within the same file as their main class. Added new DarkControl superclass.
45 lines
888 B
C#
45 lines
888 B
C#
using System.Drawing;
|
|
|
|
namespace DarkUI.Docking
|
|
{
|
|
internal class DarkDockTab
|
|
{
|
|
#region Property Region
|
|
|
|
public DarkDockContent DockContent { get; set; }
|
|
|
|
public Rectangle ClientRectangle { get; set; }
|
|
|
|
public Rectangle CloseButtonRectangle { get; set; }
|
|
|
|
public bool Hot { get; set; }
|
|
|
|
public bool CloseButtonHot { get; set; }
|
|
|
|
public bool ShowSeparator { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region Constructor Region
|
|
|
|
public DarkDockTab(DarkDockContent content)
|
|
{
|
|
DockContent = content;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Method Region
|
|
|
|
public int CalculateWidth(Graphics g, Font font)
|
|
{
|
|
var width = (int)g.MeasureString(DockContent.DockText, font).Width;
|
|
width += 10;
|
|
|
|
return width;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|