Class CaptionPainter
Inheritance
System.Object
CaptionPainter
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Syncfusion.Tools.Windows.dll
public class CaptionPainter : Disposable, IDisposable
Constructors
Constructor of the CaptionPainter
Declaration
public CaptionPainter(DockHostController dhc)
Parameters
Fields
Declaration
protected CaptionButton btnHover
Field Value
Declaration
protected CaptionButton btnPressed
Field Value
Holds the constant value for caption bution size adjusting factor
Declaration
protected const int buttonSizeFactor = 6
Field Value
Declaration
protected const int DEF_BORDER_WIDTH = 1
Field Value
Declaration
protected const int DEF_BUTTON_SIDE_INDENT = 3
Field Value
Declaration
protected const int DEF_BUTTON_SPACE_BETWEEN = 1
Field Value
Declaration
protected const int DEF_BUTTON_THEMED_SIZE = 20
Field Value
Declaration
protected const int DEF_BUTTON_TOP_INDENT = 4
Field Value
Declaration
protected const int DEF_CAPTION_TOP_INDENT = 2
Field Value
Declaration
protected const int DEF_ICON_INDENT = 2
Field Value
Declaration
protected const int DEF_ICON_SIZE = 16
Field Value
Declaration
protected DockHostController dhcOwner
Field Value
Declaration
Field Value
Declaration
protected DockLabelAlignmentStyle labelAlignment
Field Value
Declaration
protected CaptionButtonsCollection m_buttons
Field Value
Declaration
protected int nCaptionButtonIndex
Field Value
nTextOffset
Declaration
protected const int nTextOffset = 2
Field Value
Declaration
protected ThemedControlDrawing tdExplorerBar
Field Value
Declaration
protected ThemedControlDrawing tdWindow
Field Value
Declaration
protected ToolTip toolTip
Field Value
Type |
System.Windows.Forms.ToolTip |
Properties
Returns the default border width.
Declaration
public int BorderWidth { get; }
Property Value
Returns the CaptionButtonsCollection.
Declaration
public CaptionButtonsCollection Buttons { get; }
Property Value
Returns the caption button height.
Declaration
public static int CaptionButtonHeight { get; }
Property Value
Returns the Caption Button width.
Declaration
public static int CaptionButtonWidth { get; }
Property Value
Returns the Caption height.
Declaration
public static int CaptionHeight { get; }
Property Value
Returns the caption rectangle.
Declaration
public Rectangle CaptionRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Declaration
protected int CaptionTopIndent { get; }
Property Value
Declaration
protected Rectangle ImageRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
TextRect
Declaration
protected Rectangle TextRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Methods
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Overrides
Declaration
protected virtual void DrawAutoHideButton(Graphics gph, Rectangle rcbtn, Color clrbtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcbtn |
|
System.Drawing.Color |
clrbtn |
|
Declaration
protected virtual void DrawCloseButton(Graphics gph, Rectangle rcbtn, Color clrbtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcbtn |
|
System.Drawing.Color |
clrbtn |
|
Declaration
protected virtual void DrawHoverBorder(Graphics gph, Rectangle rcbtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcbtn |
|
Declaration
protected virtual void DrawImage(Graphics gph)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
Declaration
protected virtual void DrawMaximizeButton(Graphics gph, Rectangle rcBth, Color clBtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcBth |
|
System.Drawing.Color |
clBtn |
|
Declaration
protected virtual void DrawMenuButton(Graphics gph, Rectangle rcBth, Color clBtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcBth |
|
System.Drawing.Color |
clBtn |
|
Declaration
protected virtual void DrawPressedBorder(Graphics gph, Rectangle rcbtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
|
System.Drawing.Rectangle |
rcbtn |
|
Declaration
protected virtual void DrawRestoreButton(Graphics g, Rectangle rcBth, Color clBtn)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.Rectangle |
rcBth |
|
System.Drawing.Color |
clBtn |
|
Declaration
protected bool DrawWithHighlight()
Returns
Returns the caption button from the specified point
Declaration
public virtual CaptionButton GetButtonAt(Point pt)
Parameters
Type |
Name |
Description |
System.Drawing.Point |
pt |
The coordinate point.
|
Returns
Returns the Caption Button image bounds.
Declaration
public virtual Rectangle GetButtonImageBounds(CaptionButtonType buttonType)
Parameters
Returns
Type |
System.Drawing.Rectangle |
Returns the CaptionButton Bounds
Declaration
public virtual Rectangle GetCaptionButtonBounds(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
The index of the caption button.
|
Returns
Type |
System.Drawing.Rectangle |
Returns the caption button index
Declaration
public virtual int GetCaptionButtonIndex()
Returns
Type |
Description |
System.Int32 |
The index of the caption button.
|
Declaration
public virtual CaptionButton GetHitButton()
Returns
Returns the Caption hit area.
Declaration
public virtual CaptionPainter.CaptionHitTest HitTest(MouseAction action, Point pt)
Parameters
Type |
Name |
Description |
MouseAction |
action |
The mouse action on caption
|
System.Drawing.Point |
pt |
The coordinate point.
|
Returns
Declaration
protected void Owner_SystemColorsChanged(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
Declaration
public virtual void PaintCaption(Graphics gph, Pen pen)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
gph |
The Graphics objects
|
System.Drawing.Pen |
pen |
The Pen which needs to paint the caption.
|
Declaration
protected void ProcessMouseMove(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Declaration
protected void RefreshCaptionButtonsCollection()
Declaration
protected void ResetCaptonButtonsHitTest()
Declaration
protected virtual void SetCaptionButtonIndex(Point pt)
Parameters
Type |
Name |
Description |
System.Drawing.Point |
pt |
|
Implements
System.IDisposable