Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events | List of all members
Sandbox.Graphics.GUI.MyGuiControlListbox Class Reference
Inheritance diagram for Sandbox.Graphics.GUI.MyGuiControlListbox:
Sandbox.Graphics.GUI.MyGuiControlBase Sandbox.Graphics.GUI.IMyGuiControlsOwner

Classes

class  Item
 
class  StyleDefinition
 

Public Member Functions

 MyGuiControlListbox ()
 
 MyGuiControlListbox (Vector2?position=null, MyGuiControlListboxStyleEnum visualStyle=MyGuiControlListboxStyleEnum.Default)
 
override void Init (MyObjectBuilder_GuiControlBase objectBuilder)
 
override MyObjectBuilder_GuiControlBase GetObjectBuilder ()
 
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 Draw (float transitionAlpha, float backgroundTransitionAlpha)
 
override void ShowToolTip ()
 
override void OnRemoving ()
 Removes various references and clears event handlers. More...
 
void Remove (Predicate< Item > match)
 
void Add (Item item, int?position=null)
 
bool IsOverScrollBar ()
 
void ScrollToolbarToTop ()
 GR: Individual controls should reset toolbar postion if needed. Do no do in refresh of toolbar becaues it may happen often and cause bugs (autoscrolling to top every few frames when not intended) More...
 
void SelectAllVisible ()
 
void ChangeSelection (List< bool > states)
 
void ClearItems ()
 
void StoreSituation ()
 
void RestoreSituation (bool compareUserData, bool compareText)
 
void ApplyStyle (StyleDefinition style)
 
- Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
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 Update ()
 
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 ()
 

Static Public Member Functions

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

Public Attributes

readonly ObservableCollection< ItemItems
 
List< ItemSelectedItems = new List<Item>()
 
bool MultiSelect
 
- 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 OnPositionChanged ()
 
override void OnOriginAlignChanged ()
 
override void OnHasHighlightChanged ()
 
- 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 OnSizeChanged ()
 
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 ()
 

Properties

Item MouseOverItem [get]
 
Vector2 ItemSize [get, set]
 
float TextScale [get]
 
int VisibleRowsCount [get, set]
 
int FirstVisibleRow [get, set]
 
MyGuiControlListboxStyleEnum VisualStyle [get, set]
 
- 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< MyGuiControlListboxItemClicked
 
Action< MyGuiControlListboxItemDoubleClicked
 
Action< MyGuiControlListboxItemsSelected
 
Action< MyGuiControlListboxItemMouseOver
 
- 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

- Protected Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
bool m_mouseButtonPressed = false
 
bool m_showToolTip = false
 
Vector2 m_toolTipPosition
 

Detailed Description

Definition at line 16 of file MyGuiControlListbox.cs.

Constructor & Destructor Documentation

Sandbox.Graphics.GUI.MyGuiControlListbox.MyGuiControlListbox ( )
inline

Definition at line 322 of file MyGuiControlListbox.cs.

Sandbox.Graphics.GUI.MyGuiControlListbox.MyGuiControlListbox ( Vector2 position = null,
MyGuiControlListboxStyleEnum  visualStyle = MyGuiControlListboxStyleEnum.Default 
)
inline

Definition at line 324 of file MyGuiControlListbox.cs.

Member Function Documentation

void Sandbox.Graphics.GUI.MyGuiControlListbox.Add ( Item  item,
int?  position = null 
)
inline

Definition at line 556 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.ApplyStyle ( StyleDefinition  style)
inline

Definition at line 956 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.ChangeSelection ( List< bool >  states)
inline

Definition at line 809 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.ClearItems ( )
inline

Definition at line 827 of file MyGuiControlListbox.cs.

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

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 407 of file MyGuiControlListbox.cs.

override MyObjectBuilder_GuiControlBase Sandbox.Graphics.GUI.MyGuiControlListbox.GetObjectBuilder ( )
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 355 of file MyGuiControlListbox.cs.

static StyleDefinition Sandbox.Graphics.GUI.MyGuiControlListbox.GetVisualStyle ( MyGuiControlListboxStyleEnum  style)
inlinestatic

Definition at line 181 of file MyGuiControlListbox.cs.

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

override void Sandbox.Graphics.GUI.MyGuiControlListbox.Init ( MyObjectBuilder_GuiControlBase  objectBuilder)
inlinevirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 345 of file MyGuiControlListbox.cs.

bool Sandbox.Graphics.GUI.MyGuiControlListbox.IsOverScrollBar ( )
inline

Definition at line 696 of file MyGuiControlListbox.cs.

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

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 530 of file MyGuiControlListbox.cs.

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

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 524 of file MyGuiControlListbox.cs.

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

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 518 of file MyGuiControlListbox.cs.

override void Sandbox.Graphics.GUI.MyGuiControlListbox.OnRemoving ( )
inlinevirtual

Removes various references and clears event handlers.

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 537 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.Remove ( Predicate< Item match)
inline

Definition at line 547 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.RestoreSituation ( bool  compareUserData,
bool  compareText 
)
inline

Definition at line 902 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.ScrollToolbarToTop ( )
inline

GR: Individual controls should reset toolbar postion if needed. Do no do in refresh of toolbar becaues it may happen often and cause bugs (autoscrolling to top every few frames when not intended)

Definition at line 751 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.SelectAllVisible ( )
inline

Definition at line 797 of file MyGuiControlListbox.cs.

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

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlBase.

Definition at line 507 of file MyGuiControlListbox.cs.

void Sandbox.Graphics.GUI.MyGuiControlListbox.StoreSituation ( )
inline

Definition at line 849 of file MyGuiControlListbox.cs.

Member Data Documentation

readonly ObservableCollection<Item> Sandbox.Graphics.GUI.MyGuiControlListbox.Items

Definition at line 250 of file MyGuiControlListbox.cs.

bool Sandbox.Graphics.GUI.MyGuiControlListbox.MultiSelect

Definition at line 311 of file MyGuiControlListbox.cs.

List<Item> Sandbox.Graphics.GUI.MyGuiControlListbox.SelectedItems = new List<Item>()

Definition at line 252 of file MyGuiControlListbox.cs.

Property Documentation

int Sandbox.Graphics.GUI.MyGuiControlListbox.FirstVisibleRow
getset

Definition at line 286 of file MyGuiControlListbox.cs.

Vector2 Sandbox.Graphics.GUI.MyGuiControlListbox.ItemSize
getset

Definition at line 263 of file MyGuiControlListbox.cs.

Item Sandbox.Graphics.GUI.MyGuiControlListbox.MouseOverItem
get

Definition at line 255 of file MyGuiControlListbox.cs.

float Sandbox.Graphics.GUI.MyGuiControlListbox.TextScale
get

Definition at line 269 of file MyGuiControlListbox.cs.

int Sandbox.Graphics.GUI.MyGuiControlListbox.VisibleRowsCount
getset

Definition at line 275 of file MyGuiControlListbox.cs.

MyGuiControlListboxStyleEnum Sandbox.Graphics.GUI.MyGuiControlListbox.VisualStyle
getset

Definition at line 301 of file MyGuiControlListbox.cs.

Event Documentation

Action<MyGuiControlListbox> Sandbox.Graphics.GUI.MyGuiControlListbox.ItemClicked

Definition at line 315 of file MyGuiControlListbox.cs.

Action<MyGuiControlListbox> Sandbox.Graphics.GUI.MyGuiControlListbox.ItemDoubleClicked

Definition at line 316 of file MyGuiControlListbox.cs.

Action<MyGuiControlListbox> Sandbox.Graphics.GUI.MyGuiControlListbox.ItemMouseOver

Definition at line 318 of file MyGuiControlListbox.cs.

Action<MyGuiControlListbox> Sandbox.Graphics.GUI.MyGuiControlListbox.ItemsSelected

Definition at line 317 of file MyGuiControlListbox.cs.


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