Space Engineers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
Sandbox.Graphics.GUI.MyGuiControlTable Class Reference
Inheritance diagram for Sandbox.Graphics.GUI.MyGuiControlTable:
Sandbox.Graphics.GUI.MyGuiControlBase Sandbox.Graphics.GUI.IMyGuiControlsOwner Sandbox.Gui.DirectoryBrowser.MyGuiControlDirectoryBrowser Sandbox.Game.Screens.Helpers.MyGuiControlSaveBrowser

Classes

class  Cell
 
struct  EventArgs
 
class  Row
 
class  StyleDefinition
 

Public Types

enum  SortStateEnum { SortStateEnum.Unsorted, SortStateEnum.Ascending, SortStateEnum.Descending }
 

Public Member Functions

 MyGuiControlTable ()
 
void Add (Row row)
 
void Insert (int index, Row row)
 
void Clear ()
 
Row GetRow (int index)
 
Row Find (Predicate< Row > match)
 
int FindIndex (Predicate< Row > match)
 
void Remove (Predicate< Row > match)
 
void RemoveSelectedRow ()
 
void MoveSelectedRowUp ()
 
void MoveSelectedRowDown ()
 
void MoveSelectedRowTop ()
 
void MoveSelectedRowBottom ()
 
void MoveToNextRow ()
 
void MoveToPreviousRow ()
 
void SetColumnName (int colIdx, StringBuilder name)
 
void SetColumnComparison (int colIdx, Comparison< Cell > ascendingComparison)
 
void SetCustomColumnWidths (float[] p)
 Modifies width of each column. Note that widths are relative to the width of table (excluding slider), so they should sum up to 1. Setting widths to 0.75 and 0.25 for 2 column table will give 3/4 of size to one column and 1/4 to the second one. More...
 
void SetColumnAlign (int colIdx, MyGuiDrawAlignEnum align=MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER)
 
void SetHeaderColumnAlign (int colIdx, MyGuiDrawAlignEnum align=MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER)
 
void ScrollToSelection ()
 
override void Draw (float transitionAlpha, float backgroundTransitionAlpha)
 
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 ShowToolTip ()
 
void Sort (bool switchSort=true)
 
void SortByColumn (int columnIdx, SortStateEnum?sortState=null, bool switchSort=true)
 
int FindRow (Row row)
 
- 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 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)
 
virtual void OnRemoving ()
 Removes various references and clears event handlers. More...
 
void GetElementsUnderCursor (Vector2 position, bool visibleOnly, List< MyGuiControlBase > controls)
 
virtual MyGuiControlBase GetNextFocusControl (MyGuiControlBase currentFocusControl, bool forwardMovement)
 
override string ToString ()
 

Static Public Member Functions

static StyleDefinition GetVisualStyle (MyGuiControlTableStyleEnum style)
 
- 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)
 

Protected Member Functions

override void OnOriginAlignChanged ()
 
override void OnPositionChanged ()
 
override void OnHasHighlightChanged ()
 
override void OnSizeChanged ()
 
- 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 OnVisibleChanged ()
 
virtual void OnEnabledChanged ()
 
virtual void OnColorMaskChanged ()
 
MyGuiScreenBase GetTopMostOwnerScreen ()
 
bool IsMouseOverOrKeyboardActive ()
 
virtual void DrawElements (float transitionAlpha, float backgroundTransitionAlpha)
 
MyGuiControlBase HandleInputElements ()
 
virtual void ClearEvents ()
 

Protected Attributes

int m_visibleRowIndexOffset
 Index computed from scrollbar. More...
 
- Protected Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
bool m_mouseButtonPressed = false
 
bool m_showToolTip = false
 
Vector2 m_toolTipPosition
 

Properties

MyGuiControls Controls [get]
 
MyVScrollbar ScrollBar [get]
 
bool HeaderVisible [get, set]
 
int ColumnsCount [get, set]
 
int SelectedRowIndex [get, set]
 
Row SelectedRow [get, set]
 
int VisibleRowsCount [get, set]
 
float RowHeight [get]
 
MyGuiControlTableStyleEnum VisualStyle [get, set]
 
float TextScale [get]
 
float TextScaleWithLanguage [get]
 
int RowsCount [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]
 

Events

Action< MyGuiControlTable, EventArgsItemDoubleClicked
 
Action< MyGuiControlTable, EventArgsItemRightClicked
 
Action< MyGuiControlTable, EventArgsItemSelected
 
Action< MyGuiControlTable, EventArgsItemConfirmed
 
Action< MyGuiControlTable, int > ColumnClicked
 
- 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...
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 19 of file MyGuiControlTable.cs.

Member Enumeration Documentation

Enumerator
Unsorted 
Ascending 
Descending 

Definition at line 1028 of file MyGuiControlTable.cs.

Constructor & Destructor Documentation

Sandbox.Graphics.GUI.MyGuiControlTable.MyGuiControlTable ( )
inline

Definition at line 245 of file MyGuiControlTable.cs.

Member Function Documentation

void Sandbox.Graphics.GUI.MyGuiControlTable.Add ( Row  row)
inline

Definition at line 260 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.Clear ( )
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 272 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.Draw ( float  transitionAlpha,
float  backgroundTransitionAlpha 
)
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 492 of file MyGuiControlTable.cs.

Row Sandbox.Graphics.GUI.MyGuiControlTable.Find ( Predicate< Row match)
inline

Definition at line 300 of file MyGuiControlTable.cs.

int Sandbox.Graphics.GUI.MyGuiControlTable.FindIndex ( Predicate< Row match)
inline

Definition at line 305 of file MyGuiControlTable.cs.

int Sandbox.Graphics.GUI.MyGuiControlTable.FindRow ( Row  row)
inline

Definition at line 893 of file MyGuiControlTable.cs.

Row Sandbox.Graphics.GUI.MyGuiControlTable.GetRow ( int  index)
inline

Definition at line 295 of file MyGuiControlTable.cs.

static StyleDefinition Sandbox.Graphics.GUI.MyGuiControlTable.GetVisualStyle ( MyGuiControlTableStyleEnum  style)
inlinestatic

Definition at line 83 of file MyGuiControlTable.cs.

override MyGuiControlBase Sandbox.Graphics.GUI.MyGuiControlTable.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 510 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.Insert ( int  index,
Row  row 
)
inline

Definition at line 266 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveSelectedRowBottom ( )
inline

Definition at line 383 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveSelectedRowDown ( )
inline

Definition at line 358 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveSelectedRowTop ( )
inline

Definition at line 372 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveSelectedRowUp ( )
inline

Definition at line 344 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveToNextRow ( )
inline

Definition at line 394 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.MoveToPreviousRow ( )
inline

Definition at line 415 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.OnHasHighlightChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 575 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.OnOriginAlignChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 563 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.OnPositionChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 569 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.OnSizeChanged ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 581 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.Remove ( Predicate< Row match)
inline

Definition at line 310 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.RemoveSelectedRow ( )
inline

Definition at line 332 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.ScrollToSelection ( )
inline

Definition at line 475 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SetColumnAlign ( int  colIdx,
MyGuiDrawAlignEnum  align = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER 
)
inline

Definition at line 461 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SetColumnComparison ( int  colIdx,
Comparison< Cell ascendingComparison 
)
inline

Definition at line 443 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SetColumnName ( int  colIdx,
StringBuilder  name 
)
inline

Definition at line 436 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SetCustomColumnWidths ( float[]  p)
inline

Modifies width of each column. Note that widths are relative to the width of table (excluding slider), so they should sum up to 1. Setting widths to 0.75 and 0.25 for 2 column table will give 3/4 of size to one column and 1/4 to the second one.

Definition at line 454 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SetHeaderColumnAlign ( int  colIdx,
MyGuiDrawAlignEnum  align = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER 
)
inline

Definition at line 468 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.ShowToolTip ( )
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 587 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.Sort ( bool  switchSort = true)
inline

Definition at line 847 of file MyGuiControlTable.cs.

void Sandbox.Graphics.GUI.MyGuiControlTable.SortByColumn ( int  columnIdx,
SortStateEnum sortState = null,
bool  switchSort = true 
)
inline

Definition at line 853 of file MyGuiControlTable.cs.

override void Sandbox.Graphics.GUI.MyGuiControlTable.Update ( )
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 552 of file MyGuiControlTable.cs.

Member Data Documentation

int Sandbox.Graphics.GUI.MyGuiControlTable.m_visibleRowIndexOffset
protected

Index computed from scrollbar.

Definition at line 124 of file MyGuiControlTable.cs.

Property Documentation

int Sandbox.Graphics.GUI.MyGuiControlTable.ColumnsCount
getset

Definition at line 147 of file MyGuiControlTable.cs.

MyGuiControls Sandbox.Graphics.GUI.MyGuiControlTable.Controls
get

Definition at line 26 of file MyGuiControlTable.cs.

bool Sandbox.Graphics.GUI.MyGuiControlTable.HeaderVisible
getset

Definition at line 137 of file MyGuiControlTable.cs.

float Sandbox.Graphics.GUI.MyGuiControlTable.RowHeight
get

Definition at line 199 of file MyGuiControlTable.cs.

int Sandbox.Graphics.GUI.MyGuiControlTable.RowsCount
get

Definition at line 291 of file MyGuiControlTable.cs.

MyVScrollbar Sandbox.Graphics.GUI.MyGuiControlTable.ScrollBar
get

Definition at line 119 of file MyGuiControlTable.cs.

Row Sandbox.Graphics.GUI.MyGuiControlTable.SelectedRow
getset

Definition at line 168 of file MyGuiControlTable.cs.

int Sandbox.Graphics.GUI.MyGuiControlTable.SelectedRowIndex
getset

Definition at line 158 of file MyGuiControlTable.cs.

float Sandbox.Graphics.GUI.MyGuiControlTable.TextScale
get

Definition at line 216 of file MyGuiControlTable.cs.

float Sandbox.Graphics.GUI.MyGuiControlTable.TextScaleWithLanguage
get

Definition at line 226 of file MyGuiControlTable.cs.

int Sandbox.Graphics.GUI.MyGuiControlTable.VisibleRowsCount
getset

Definition at line 188 of file MyGuiControlTable.cs.

MyGuiControlTableStyleEnum Sandbox.Graphics.GUI.MyGuiControlTable.VisualStyle
getset

Definition at line 205 of file MyGuiControlTable.cs.

Event Documentation

Action<MyGuiControlTable, int> Sandbox.Graphics.GUI.MyGuiControlTable.ColumnClicked

Definition at line 241 of file MyGuiControlTable.cs.

Action<MyGuiControlTable, EventArgs> Sandbox.Graphics.GUI.MyGuiControlTable.ItemConfirmed

Definition at line 239 of file MyGuiControlTable.cs.

Action<MyGuiControlTable, EventArgs> Sandbox.Graphics.GUI.MyGuiControlTable.ItemDoubleClicked

Definition at line 233 of file MyGuiControlTable.cs.

Action<MyGuiControlTable, EventArgs> Sandbox.Graphics.GUI.MyGuiControlTable.ItemRightClicked

Definition at line 235 of file MyGuiControlTable.cs.

Action<MyGuiControlTable, EventArgs> Sandbox.Graphics.GUI.MyGuiControlTable.ItemSelected

Definition at line 237 of file MyGuiControlTable.cs.


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