DotNet 4.8.1 build of DotNetBar

This commit is contained in:
2025-02-07 10:35:23 -05:00
parent 33439b63a0
commit 6b0a5d60f4
2609 changed files with 989814 additions and 7 deletions

View File

@@ -0,0 +1,57 @@
using System;
using System.Text;
using System.Drawing;
#if AdvTree
namespace DevComponents.Tree.TextMarkup
#elif DOTNETBAR
namespace DevComponents.DotNetBar.TextMarkup
#elif SUPERGRID
namespace DevComponents.SuperGrid.TextMarkup
#elif LAYOUT
namespace DevComponents.DotNetBar.Layout.TextMarkup
#endif
{
internal class FontChangeElement : MarkupElement
{
#region Private Variables
protected Font m_OldFont = null;
#endregion
#region Internal Implementation
public override void Measure(Size availableSize, MarkupDrawContext d)
{
this.Bounds = Rectangle.Empty;
SetFont(d);
}
public override void Render(MarkupDrawContext d)
{
SetFont(d);
}
protected virtual void SetFont(MarkupDrawContext d)
{
}
public override void RenderEnd(MarkupDrawContext d)
{
if(m_OldFont!=null)
d.CurrentFont = m_OldFont;
m_OldFont = null;
base.RenderEnd(d);
}
public override void MeasureEnd(Size availableSize, MarkupDrawContext d)
{
if (m_OldFont != null)
d.CurrentFont = m_OldFont;
m_OldFont = null;
base.MeasureEnd(availableSize, d);
}
protected override void ArrangeCore(Rectangle finalRect, MarkupDrawContext d) { }
#endregion
}
}