Class ToolStrip
Tool strip with child items.
Implements
Namespace: FlaxEditor.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ToolStrip : ContainerControl, IComparable, IDrawable
Constructors
ToolStrip(Single, Single)
Initializes a new instance of the ToolStrip class.
Declaration
public ToolStrip(float height = 32F, float y = 0F)
Parameters
System.Single
height
The toolstrip height. |
System.Single
y
The toolstrip Y position. |
Fields
ButtonClicked
Event fired when button gets clicked with the primary mouse button.
Declaration
public Action<ToolStripButton> ButtonClicked
Field Value
System.Action<FlaxEditor.GUI.ToolStripButton>
|
DefaultMarginH
The default margin horizontally.
Declaration
public const int DefaultMarginH = 2
Field Value
System.Int32
|
DefaultMarginV
The default margin vertically.
Declaration
public const int DefaultMarginV = 1
Field Value
System.Int32
|
SecondaryButtonClicked
Event fired when button gets clicked with the secondary mouse button.
Declaration
public Action<ToolStripButton> SecondaryButtonClicked
Field Value
System.Action<FlaxEditor.GUI.ToolStripButton>
|
Properties
ButtonsCount
Gets amount of buttons that has been added
Declaration
public int ButtonsCount { get; }
Property Value
System.Int32
|
ItemsHeight
Gets the height for the items.
Declaration
public float ItemsHeight { get; }
Property Value
System.Single
|
LastButton
Tries to get the last button.
Declaration
public ToolStripButton LastButton { get; }
Property Value
FlaxEditor.GUI.ToolStripButton
|
Methods
AddButton(SpriteHandle, Action)
Adds the button.
Declaration
public ToolStripButton AddButton(SpriteHandle sprite, Action onClick = null)
Parameters
SpriteHandle
sprite
The icon sprite. |
System.Action
onClick
The custom action to call on button clicked. |
Returns
FlaxEditor.GUI.ToolStripButton
The button. |
AddButton(SpriteHandle, String, Action)
Adds the button.
Declaration
public ToolStripButton AddButton(SpriteHandle sprite, string text, Action onClick = null)
Parameters
SpriteHandle
sprite
The icon sprite. |
System.String
text
The text. |
System.Action
onClick
The custom action to call on button clicked. |
Returns
FlaxEditor.GUI.ToolStripButton
The button. |
AddButton(String, Action)
Adds the button.
Declaration
public ToolStripButton AddButton(string text, Action onClick = null)
Parameters
System.String
text
The text. |
System.Action
onClick
The custom action to call on button clicked. |
Returns
FlaxEditor.GUI.ToolStripButton
The button. |
AddSeparator()
Adds the separator.
Declaration
public ToolStripSeparator AddSeparator()
Returns
ToolStripSeparator
The separator. |
OnChildResized(Control)
Called when child control gets resized.
Declaration
public override void OnChildResized(Control control)
Parameters
Control
control
The resized control. |
Overrides
OnKeyDown(KeyboardKeys)
When key goes down
Declaration
public override bool OnKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key value |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
PerformLayoutBeforeChildren()
Perform layout for that container control before performing it for child controls.
Declaration
protected override void PerformLayoutBeforeChildren()