C# Class GrayIris.Utilities.UI.Controls.YaTabControl

Inheritance: System.Windows.Forms.Control
ファイルを表示 Open project: realistschuckle/yet-another-tab-control Class Usage Examples

Public Methods

Method Description
AddNewTab ( ) : GrayIris.Utilities.UI.Controls.YaTabPage

Adds a "NEW_TAB" at the end of the list of tabs.

GetLeftScrollButtonRect ( ) : Rectangle

Gets the Rectangle that contains the left scroll button.

GetRightScrollButtonRect ( ) : Rectangle

Gets the Rectangle that contains the left scroll button.

GetTabRect ( int index ) : Rectangle

Returns the bounding rectangle for a specified tab in this tab control.

ScrollTabs ( int amount ) : void

Scrolls the tabs by the specified amount.

Positive amounts will scroll the tabs to the left. Negative amounts will scroll the tabs to the right.

YaTabControl ( ) : System

Creates a new instance of the YaTabControl class.

Protected Methods

Method Description
CreateControlsInstance ( ) : System.Windows.Forms.Control.ControlCollection

Overriden from Control.

Dispose ( bool disposing ) : void

Inherited from Control.

OnActiveColorChanged ( EventArgs ea ) : void

Fires the ActiveColorChanged event.

OnBorderColorChanged ( EventArgs ea ) : void

Fires the BorderColorChanged event.

OnControlAdded ( System.Windows.Forms.ControlEventArgs cea ) : void

Overridden. Inherited from Control.

OnControlRemoved ( System.Windows.Forms.ControlEventArgs cea ) : void

Overridden. Inherited from Control.

OnInactiveColorChanged ( EventArgs ea ) : void

Fires the InactiveColorChanged event.

OnMarginChanged ( EventArgs ea ) : void

Fires the MarginChanged event.

OnMouseClick ( MouseEventArgs e ) : void

Overridden. Inherited from Control.

OnMouseDown ( MouseEventArgs mea ) : void

Overridden. Inherited from Control.

OnMouseLeave ( EventArgs mea ) : void

Overridden. Inherited from Control.

OnMouseMove ( MouseEventArgs mea ) : void

Overridden. Inherited from Control.

OnMouseUp ( MouseEventArgs mea ) : void

Overridden. Inherited from Control.

OnNewTabButtonClicked ( NewTabEventArgs ea ) : void

Fires the NewTabButtonClicked event.

OnPaint ( PaintEventArgs pea ) : void

Inherited from Control.

OnScrollButtonStyleChanged ( EventArgs ea ) : void

Fires the ScrollButtonStyleChanged event.

OnSizeChanged ( EventArgs e ) : void

Inherited from Control.

OnTabChanged ( EventArgs ea ) : void

Fires the TabChanged event.

OnTabChanging ( GrayIris.Utilities.UI.Controls.TabChangingEventArgs tcea ) : void

Fires the TabChanging event.

OnTabClosing ( TabClosingEventArgs e ) : void

Fires the TabClosing event.

OnTabDockChanged ( EventArgs ea ) : void

Fires the TabDockChanged event.

OnTabDrawerChanged ( EventArgs ea ) : void

Fires the TabDrawerChanged event.

OnTabFontChanged ( EventArgs ea ) : void

Fires the TabFontChanged event.

Private Methods

Method Description
CalculateLastVisibleTabIndex ( ) : void

Calculates the last visible tab shown on the control.

CalculateRectangles ( ) : void

Calculates the rectangles for the tab area, the client area, the display area, and the transformed display area.

CalculateTabLengths ( ) : void

Calculates and caches the length of each tab given the value of the Control.Text property of each YaTabPage.

CalculateTabSpan ( ) : void

Calculates the span of a tab given the value of the Font property.

ChildTabTextChanged ( object sender, EventArgs ea ) : void

Monitors when child YaTabPages have their YaTabPage.Text property changed.

GetRectangleClose ( Rectangle tabRectangle, int inflateSize ) : RectangleF
InU ( ) : void

Invalidates and updates the YaTabControl.

IsNewTab ( int tabIndex ) : bool

Indicates whether a given tab index represents the "NEW_TAB"

YaTabPage_TextChanged ( object sender, EventArgs e ) : void

Handles when the text changes for a control.

Method Details

AddNewTab() public method

Adds a "NEW_TAB" at the end of the list of tabs.
public AddNewTab ( ) : GrayIris.Utilities.UI.Controls.YaTabPage
return GrayIris.Utilities.UI.Controls.YaTabPage

CreateControlsInstance() protected method

Overriden from Control.
protected CreateControlsInstance ( ) : System.Windows.Forms.Control.ControlCollection
return System.Windows.Forms.Control.ControlCollection

Dispose() protected method

Inherited from Control.
protected Dispose ( bool disposing ) : void
disposing bool /// See . ///
return void

GetLeftScrollButtonRect() public method

Gets the Rectangle that contains the left scroll button.
public GetLeftScrollButtonRect ( ) : Rectangle
return System.Drawing.Rectangle

GetRightScrollButtonRect() public method

Gets the Rectangle that contains the left scroll button.
public GetRightScrollButtonRect ( ) : Rectangle
return System.Drawing.Rectangle

GetTabRect() public method

Returns the bounding rectangle for a specified tab in this tab control.
/// The index is less than zero.
-or-
The index is greater than or equal to . ///
public GetTabRect ( int index ) : Rectangle
index int The 0-based index of the tab you want.
return System.Drawing.Rectangle

OnActiveColorChanged() protected method

Fires the ActiveColorChanged event.
protected OnActiveColorChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnBorderColorChanged() protected method

Fires the BorderColorChanged event.
protected OnBorderColorChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnControlAdded() protected method

Overridden. Inherited from Control.
protected OnControlAdded ( System.Windows.Forms.ControlEventArgs cea ) : void
cea System.Windows.Forms.ControlEventArgs /// See . ///
return void

OnControlRemoved() protected method

Overridden. Inherited from Control.
protected OnControlRemoved ( System.Windows.Forms.ControlEventArgs cea ) : void
cea System.Windows.Forms.ControlEventArgs /// See . ///
return void

OnInactiveColorChanged() protected method

Fires the InactiveColorChanged event.
protected OnInactiveColorChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnMarginChanged() protected method

Fires the MarginChanged event.
protected OnMarginChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnMouseClick() protected method

Overridden. Inherited from Control.
protected OnMouseClick ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseDown() protected method

Overridden. Inherited from Control.
protected OnMouseDown ( MouseEventArgs mea ) : void
mea MouseEventArgs /// See . ///
return void

OnMouseLeave() protected method

Overridden. Inherited from Control.
protected OnMouseLeave ( EventArgs mea ) : void
mea System.EventArgs /// See . ///
return void

OnMouseMove() protected method

Overridden. Inherited from Control.
protected OnMouseMove ( MouseEventArgs mea ) : void
mea MouseEventArgs /// See . ///
return void

OnMouseUp() protected method

Overridden. Inherited from Control.
protected OnMouseUp ( MouseEventArgs mea ) : void
mea MouseEventArgs /// Some . ///
return void

OnNewTabButtonClicked() protected method

Fires the NewTabButtonClicked event.
protected OnNewTabButtonClicked ( NewTabEventArgs ea ) : void
ea NewTabEventArgs /// Some . ///
return void

OnPaint() protected method

Inherited from Control.
protected OnPaint ( PaintEventArgs pea ) : void
pea PaintEventArgs /// See . ///
return void

OnScrollButtonStyleChanged() protected method

Fires the ScrollButtonStyleChanged event.
protected OnScrollButtonStyleChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnSizeChanged() protected method

Inherited from Control.
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs /// See . ///
return void

OnTabChanged() protected method

Fires the TabChanged event.
protected OnTabChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some for the event. ///
return void

OnTabChanging() protected method

Fires the TabChanging event.
protected OnTabChanging ( GrayIris.Utilities.UI.Controls.TabChangingEventArgs tcea ) : void
tcea GrayIris.Utilities.UI.Controls.TabChangingEventArgs /// Some for the event. ///
return void

OnTabClosing() protected method

Fires the TabClosing event.
protected OnTabClosing ( TabClosingEventArgs e ) : void
e TabClosingEventArgs /// Some for the event. ///
return void

OnTabDockChanged() protected method

Fires the TabDockChanged event.
protected OnTabDockChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnTabDrawerChanged() protected method

Fires the TabDrawerChanged event.
protected OnTabDrawerChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

OnTabFontChanged() protected method

Fires the TabFontChanged event.
protected OnTabFontChanged ( EventArgs ea ) : void
ea System.EventArgs /// Some . ///
return void

ScrollTabs() public method

Scrolls the tabs by the specified amount.
Positive amounts will scroll the tabs to the left. Negative amounts will scroll the tabs to the right.
public ScrollTabs ( int amount ) : void
amount int /// The number of pixels to scroll the tabs. ///
return void

YaTabControl() public method

Creates a new instance of the YaTabControl class.
public YaTabControl ( ) : System
return System