Space Engineers
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
Sandbox.Game.Screens.Helpers.MyGuiControlToolbar Class Reference
Inheritance diagram for Sandbox.Game.Screens.Helpers.MyGuiControlToolbar:
Sandbox.Graphics.GUI.MyGuiControlBase Sandbox.Graphics.GUI.IMyGuiControlsOwner

Public Member Functions

 MyGuiControlToolbar ()
 
override void OnRemoving ()
 Removes various references and clears event handlers. More...
 
override MyGuiControlBase HandleInput ()
 Method returns true if input was captured by control, so no other controls, nor screen can use input in this update. More...
 
override void Update ()
 
override void Draw (float transitionAlpha, float backgroundTransitionAlpha)
 
bool IsToolbarGrid (MyGuiControlGrid grid)
 
void ShowToolbar (MyToolbar toolbar)
 
void HandleDragAndDrop (object sender, MyDragAndDropEventArgs eventArgs)
 
- Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
virtual void Init (MyObjectBuilder_GuiControlBase builder)
 
virtual MyObjectBuilder_GuiControlBase GetObjectBuilder ()
 
virtual MyGuiControlGridDragAndDrop GetDragAndDropHandlingNow ()
 
virtual MyGuiControlBase GetExclusiveInputHandler ()
 
virtual MyGuiControlBase GetMouseOverControl ()
 Returns first control, which has mouse over. More...
 
virtual void HideToolTip ()
 
virtual bool IsMouseOverAnyControl ()
 
virtual void ShowToolTip ()
 
virtual bool CheckMouseOver ()
 Checks if mouse cursor is over control. GR: Update: Also check if mouse over parent controls. Slower but more solid implementation (and we get rid of a few bugs). Also there is no need for HandleMouse variable (removed) More...
 
virtual string GetMouseCursorTexture ()
 
Vector2 GetPositionAbsolute ()
 
Vector2 GetPositionAbsoluteBottomLeft ()
 
Vector2 GetPositionAbsoluteBottomRight ()
 
Vector2 GetPositionAbsoluteCenterLeft ()
 
Vector2 GetPositionAbsoluteCenter ()
 
Vector2 GetPositionAbsoluteTopLeft ()
 
Vector2 GetPositionAbsoluteTopRight ()
 
Vector2 GetSize ()
 
void SetToolTip (MyToolTips toolTip)
 
void SetToolTip (String text)
 
void SetToolTip (MyStringId text)
 
void GetElementsUnderCursor (Vector2 position, bool visibleOnly, List< MyGuiControlBase > controls)
 
virtual MyGuiControlBase GetNextFocusControl (MyGuiControlBase currentFocusControl, bool forwardMovement)
 
virtual void Clear ()
 
override string ToString ()
 

Public Attributes

bool UseContextMenu = true
 
- Public Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
readonly MyGuiControls Elements
 
MyGuiCompositeTexture BackgroundTexture
 
Vector4 BorderColor
 
bool BorderEnabled
 
bool DrawWhilePaused
 
bool ShowTooltipWhenDisabled
 
bool IsActiveControl
 There are some controls, that cannot receive any handle input(control panel for example), thus disable them with this. More...
 
MyGuiControlHighlightType HighlightType
 

Protected Member Functions

override void OnVisibleChanged ()
 
override void OnSizeChanged ()
 
virtual void SetGridItemAt (int slot, MyToolbarItem item, string[] icons, string subicon, String tooltip, MyGuiControlGrid.ColoredIcon?symbol=null, bool clear=false)
 
- Protected Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
 MyGuiControlBase (Vector2?position=null, Vector2?size=null, Vector4?colorMask=null, String toolTip=null, MyGuiCompositeTexture backgroundTexture=null, bool isActiveControl=true, bool canHaveFocus=false, bool allowFocusingElements=false, MyGuiControlHighlightType highlightType=MyGuiControlHighlightType.WHEN_ACTIVE, MyGuiDrawAlignEnum originAlign=MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER)
 
void DrawBackground (float transitionAlpha)
 
void DrawBorder (float transitionAlpha)
 
virtual bool ShouldHaveHighlight ()
 
virtual void OnHasHighlightChanged ()
 
virtual void OnPositionChanged ()
 
virtual void OnOriginAlignChanged ()
 
virtual void OnEnabledChanged ()
 
virtual void OnColorMaskChanged ()
 
MyGuiScreenBase GetTopMostOwnerScreen ()
 
bool IsMouseOverOrKeyboardActive ()
 
virtual void DrawElements (float transitionAlpha, float backgroundTransitionAlpha)
 
MyGuiControlBase HandleInputElements ()
 
virtual void ClearEvents ()
 

Protected Attributes

MyGuiControlGrid m_toolbarItemsGrid
 
MyGuiControlLabel m_selectedItemLabel
 
MyGuiControlPanel m_colorVariantPanel
 
MyGuiControlLabel m_gridSizeLabel
 
MyGuiControlImage m_gridSize
 
MyGuiControlContextMenu m_contextMenu
 
List< MyGuiControlLabelm_pageLabelList = new List<MyGuiControlLabel>()
 
MyToolbar m_shownToolbar
 
int m_contextMenuItemIndex = -1
 
- Protected Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
bool m_mouseButtonPressed = false
 
bool m_showToolTip = false
 
Vector2 m_toolTipPosition
 

Static Protected Attributes

static StringBuilder m_textCache = new StringBuilder()
 

Properties

MyToolbar ShownToolbar [get]
 
MyGuiControlGrid ToolbarGrid [get]
 
bool DrawNumbers [get]
 
Func< int, Sandbox.Graphics.GUI.MyGuiControlGrid.ColoredIconGetSymbol [get]
 
- Properties inherited from Sandbox.Graphics.GUI.MyGuiControlBase
float Alpha [get, set]
 
string Name [get, set]
 
IMyGuiControlsOwner Owner [get]
 
MyToolTips Tooltips [get]
 
Vector2 Position [get, set]
 Position of control's center (normalized and relative to parent screen center (not left/top corner!!!)) More...
 
float PositionY [get, set]
 
float PositionX [get, set]
 
Vector2 Size [get, set]
 Size of control (normalized). More...
 
Vector2 MinSize [get, protected set]
 
Vector2 MaxSize [get, protected set]
 
Vector4 ColorMask [get, set]
 
int BorderSize [get, set]
 
bool Enabled [get, set]
 False to disable control, disabled controls are skipped when switching with Tab key etc., look implemented atm. only in MyGuiControlButton. More...
 
MyGuiDrawAlignEnum OriginAlign [get, set]
 
bool Visible [get, set]
 Says whether control is visible. Note that this is not a constant time operation (checks parents, fires events on set). More...
 
bool HasHighlight [get]
 Says whether control is currently highlighted. When control is highlit depends on HighlightType. More...
 
bool HasFocus [get]
 
bool IsMouseOver [get, set]
 
bool CanHaveFocus [get, set]
 
bool AllowFocusingElements [get, set]
 Indicates whether elements can have focus or not. More...
 
object UserData [get, set]
 Specific user data for this control. More...
 
string DebugNamePath [get]
 
- Properties inherited from Sandbox.Graphics.GUI.IMyGuiControlsOwner
string DebugNamePath [get]
 
string Name [get]
 
IMyGuiControlsOwner Owner [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
static void ReadIfHasValue< T > (ref T target, T?source)
 
static void ReadIfHasValue (ref Color target, Vector4?source)
 
static MyGuiControlBase GetExclusiveInputHandler (MyGuiControls controls)
 
static Color ApplyColorMaskModifiers (Vector4 sourceColorMask, bool enabled, float transitionAlpha)
 Modifies source color mask using transition alpha and color multiplier in case a control is disabled. More...
 
static bool CheckMouseOver (Vector2 size, Vector2 position, MyGuiDrawAlignEnum originAlign)
 
static bool IsPointInside (Vector2 queryPoint, Vector2 size, Vector2 position, MyGuiDrawAlignEnum originAlign)
 
- Events inherited from Sandbox.Graphics.GUI.MyGuiControlBase
Action< MyGuiControlBase, NameChangedArgsNameChanged
 
Action< MyGuiControlBaseSizeChanged
 
VisibleChangedDelegate VisibleChanged
 
Action< MyGuiControlBase, bool > FocusChanged
 Called when the control enters or leaves focus. More...
 

Detailed Description

Definition at line 19 of file MyGuiControlToolbar.cs.

Constructor & Destructor Documentation

Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.MyGuiControlToolbar ( )
inline

Definition at line 53 of file MyGuiControlToolbar.cs.

Member Function Documentation

override void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.Draw ( float  transitionAlpha,
float  backgroundTransitionAlpha 
)
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 126 of file MyGuiControlToolbar.cs.

void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.HandleDragAndDrop ( object  sender,
MyDragAndDropEventArgs  eventArgs 
)
inline

Definition at line 620 of file MyGuiControlToolbar.cs.

override MyGuiControlBase Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.HandleInput ( )
inlinevirtual

Method returns true if input was captured by control, so no other controls, nor screen can use input in this update.

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 89 of file MyGuiControlToolbar.cs.

bool Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.IsToolbarGrid ( MyGuiControlGrid  grid)
inline

Definition at line 236 of file MyGuiControlToolbar.cs.

override void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.OnRemoving ( )
inlinevirtual

Removes various references and clears event handlers.

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 70 of file MyGuiControlToolbar.cs.

override void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.OnSizeChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 133 of file MyGuiControlToolbar.cs.

override void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.OnVisibleChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 64 of file MyGuiControlToolbar.cs.

virtual void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.SetGridItemAt ( int  slot,
MyToolbarItem  item,
string[]  icons,
string  subicon,
String  tooltip,
MyGuiControlGrid.ColoredIcon symbol = null,
bool  clear = false 
)
inlineprotectedvirtual

Definition at line 379 of file MyGuiControlToolbar.cs.

void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.ShowToolbar ( MyToolbar  toolbar)
inline

Definition at line 241 of file MyGuiControlToolbar.cs.

override void Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.Update ( )
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 105 of file MyGuiControlToolbar.cs.

Member Data Documentation

MyGuiControlPanel Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_colorVariantPanel
protected

Definition at line 25 of file MyGuiControlToolbar.cs.

MyGuiControlContextMenu Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_contextMenu
protected

Definition at line 28 of file MyGuiControlToolbar.cs.

int Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_contextMenuItemIndex = -1
protected

Definition at line 47 of file MyGuiControlToolbar.cs.

MyGuiControlImage Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_gridSize
protected

Definition at line 27 of file MyGuiControlToolbar.cs.

MyGuiControlLabel Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_gridSizeLabel
protected

Definition at line 26 of file MyGuiControlToolbar.cs.

List<MyGuiControlLabel> Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_pageLabelList = new List<MyGuiControlLabel>()
protected

Definition at line 29 of file MyGuiControlToolbar.cs.

MyGuiControlLabel Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_selectedItemLabel
protected

Definition at line 24 of file MyGuiControlToolbar.cs.

MyToolbar Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_shownToolbar
protected

Definition at line 30 of file MyGuiControlToolbar.cs.

StringBuilder Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_textCache = new StringBuilder()
staticprotected

Definition at line 21 of file MyGuiControlToolbar.cs.

MyGuiControlGrid Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.m_toolbarItemsGrid
protected

Definition at line 23 of file MyGuiControlToolbar.cs.

bool Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.UseContextMenu = true

Definition at line 49 of file MyGuiControlToolbar.cs.

Property Documentation

bool Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.DrawNumbers
get

Definition at line 50 of file MyGuiControlToolbar.cs.

Func<int, Sandbox.Graphics.GUI.MyGuiControlGrid.ColoredIcon> Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.GetSymbol
get

Definition at line 51 of file MyGuiControlToolbar.cs.

MyToolbar Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.ShownToolbar
get

Definition at line 32 of file MyGuiControlToolbar.cs.

MyGuiControlGrid Sandbox.Game.Screens.Helpers.MyGuiControlToolbar.ToolbarGrid
get

Definition at line 39 of file MyGuiControlToolbar.cs.


The documentation for this class was generated from the following file: