GeonBit.UI

GeonBit.UI Documentation
GeonBit.UI
GeonBit.UI is part of the GeonBit project, and provide a simple yet extensive UI framework for MonoGame based projects.
Namespaces
Namespace | Description
GeonBit.UI | GeonBit.UI is part of the GeonBit project, and provide a simple yet extensive UI framework for MonoGame based projects. This is the main GeonBit.UI namespace. It contains the UserInterface manager and other important helpers.
GeonBit.UI.Entities | GeonBit.UI.Entities contains all the UI elements you can create and use in your layouts.
GeonBit.UI.Entities.TextValidators | GeonBit.UI.Entities.TextValidators contains different text validators and processors you can attach to TextInput entities.
GeonBit.UI.Exceptions |
GeonBit.UI.Utils | GeonBit.UI.Utils contain different utilities and helper classes to use GeonBit.UI.
GeonBit.UI is part of the GeonBit project. By Ronen Ness, 2016.
Send comments on this topic to ronenness@gmail.com


GeonBit.UI Namespace

GeonBit.UI Namespace
GeonBit.UI is part of the GeonBit project, and provide a simple yet extensive UI framework for MonoGame based projects. This is the main GeonBit.UI namespace. It contains the UserInterface manager and other important helpers.
Classes
 | Class | Description
Public class | DrawUtils | Helper class with drawing-related functionality.
Public class | InputHelper | Provide easier keyboard and mouse access, keyboard text input, and other user input utils.
Public class | Resources | A static class to init and store all UI resources (textures, effects, fonts, etc.)
Public class | TexturesGetterTEnum | A class to get texture with index and constant path part. Used internally.
Public class | UserInterface | Main GeonBit.UI class that manage and draw all the UI entities. This is the main manager you use to update, draw, and add entities to.
Delegates
 | Delegate | Description
Public delegate | DefaultParagraphGenerator | Callback to generate default paragraph type for internal entities.
Public delegate | EventCallback | A callback function you can register on entity events, like on-click, on-mouse-leave, etc.
Public delegate | GenerateTooltipFunc | A function used to generate tooltip entity. Used when the user points on an entity with a tooltip text and show present it.
Enumerations
 | Enumeration | Description
Public enumeration | BuiltinThemes | Enum with all the built-in themes.
Public enumeration | CursorType | Curser styles / types.
Public enumeration | MouseButton | Supported mouse buttons.


BuiltinThemes Enumeration

BuiltinThemes Enumeration
Enum with all the built-in themes.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum BuiltinThemes
Members
Member name | Value | Description
hd | 0 | Old-school style theme with hi-res textures.
lowres | 1 | Old-school style theme with low-res textures.
editor | 2 | Clean, editor-like theme.
See Also

Reference

GeonBit.UI Namespace


CursorType Enumeration

CursorType Enumeration
Curser styles / types.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum CursorType
Members
Member name | Value | Description
Default | 0 | Default cursor.
Pointer | 1 | Pointing hand cursor.
IBeam | 2 | Text-input I-beam cursor.
See Also

Reference

GeonBit.UI Namespace


DefaultParagraphGenerator Delegate

DefaultParagraphGenerator Delegate
Callback to generate default paragraph type for internal entities.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public delegate Paragraph DefaultParagraphGenerator(
    string text,
    Anchor anchor,
    Nullable<Color> color = null,
    Nullable<float> scale = null,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Paragraph starting text.
anchor
Type: GeonBit.UI.EntitiesAnchor
Paragraph anchor.
color (Optional)
Type: SystemNullable Color
Optional fill color.
scale (Optional)
Type: SystemNullable Single
Optional scale.
size (Optional)
Type: SystemNullable Vector2
Optional size.
offset (Optional)
Type: SystemNullable Vector2
Optional offset

Return Value

Type: Paragraph
See Also

Reference

GeonBit.UI Namespace


DrawUtils Class

DrawUtils Class
Helper class with drawing-related functionality.
Inheritance Hierarchy
SystemObject
GeonBit.UIDrawUtils

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class DrawUtils

The DrawUtils type exposes the following members.

Constructors
 | Name | Description
Public method | DrawUtils | Initializes a new instance of the DrawUtils class
Top
Methods
 | Name | Description
Public method | DrawImage | Draw a simple image with texture and destination rectangle. This function will stretch the texture to fit the destination rect.
Public method | DrawSurface | Draw a tiled texture with frame on destination rectangle. This function will draw repeating frame parts + tile center parts to cover destination rect.
Public method | DrawSurfaceHorizontal | Just like DrawSurface, but will stretch texture on Y axis.
Public method | DrawSurfaceVertical | Just like DrawSurface, but will stretch texture on X axis.
Public method | EndDraw | Finish drawing on a given SpriteBatch
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FixColorOpacity(Color) | Fix RGB based on Alpha channel.
Public method | FixColorOpacity(NullableColor) | Set default color to white and fix RGB based on Alpha channel.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | PopRenderTarget | Pop a render target from the render targets stack.
Public method | PushRenderTarget | Add a render target to the render targets stack.
Public method | ScaleRect | Scale a rectangle by given factor
Public method | StartDraw | Start drawing on a given SpriteBatch.
Public method | StartDrawSilhouette | Start drawing on a given SpriteBatch, but only draw colored Silhouette of the texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

GeonBit.UI Namespace


DrawUtils Constructor

DrawUtils Constructor
Initializes a new instance of the DrawUtils class

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public DrawUtils()
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils Methods

DrawUtils Methods

The DrawUtils type exposes the following members.

Methods
 | Name | Description
Public method | DrawImage | Draw a simple image with texture and destination rectangle. This function will stretch the texture to fit the destination rect.
Public method | DrawSurface | Draw a tiled texture with frame on destination rectangle. This function will draw repeating frame parts + tile center parts to cover destination rect.
Public method | DrawSurfaceHorizontal | Just like DrawSurface, but will stretch texture on Y axis.
Public method | DrawSurfaceVertical | Just like DrawSurface, but will stretch texture on X axis.
Public method | EndDraw | Finish drawing on a given SpriteBatch
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FixColorOpacity(Color) | Fix RGB based on Alpha channel.
Public method | FixColorOpacity(NullableColor) | Set default color to white and fix RGB based on Alpha channel.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | PopRenderTarget | Pop a render target from the render targets stack.
Public method | PushRenderTarget | Add a render target to the render targets stack.
Public method | ScaleRect | Scale a rectangle by given factor
Public method | StartDraw | Start drawing on a given SpriteBatch.
Public method | StartDrawSilhouette | Start drawing on a given SpriteBatch, but only draw colored Silhouette of the texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.DrawImage Method

DrawUtilsDrawImage Method
Draw a simple image with texture and destination rectangle. This function will stretch the texture to fit the destination rect.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void DrawImage(
    SpriteBatch spriteBatch,
    Texture2D texture,
    Rectangle destination,
    Nullable<Color> color = null,
    float scale = 1f,
    Nullable<Rectangle> sourceRect = null
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
texture
Type: Texture2D
Texture to draw.
destination
Type: Rectangle
Destination rectangle.
color (Optional)
Type: SystemNullable Color
Optional color tint.
scale (Optional)
Type: SystemSingle
Optional scale factor.
sourceRect (Optional)
Type: SystemNullable Rectangle
Optional source rectangle to use.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.DrawSurface Method

DrawUtilsDrawSurface Method
Draw a tiled texture with frame on destination rectangle. This function will draw repeating frame parts + tile center parts to cover destination rect.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void DrawSurface(
    SpriteBatch spriteBatch,
    Texture2D texture,
    Rectangle destination,
    Vector2 textureFrameWidth,
    float scale = 1f,
    Nullable<Color> color = null,
    float frameScale = 1f
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
texture
Type: Texture2D
Texture to draw.
destination
Type: Rectangle
Destination rectangle.
textureFrameWidth
Type: Vector2
Frame width in percents relative to texture file size. For example, 0.1, 0.1 means the frame takes 10% of the texture file.
scale (Optional)
Type: SystemSingle
Optional scale factor.
color (Optional)
Type: SystemNullable Color
Optional color tint.
frameScale (Optional)
Type: SystemSingle
Optional scale factor for the frame parts.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.DrawSurfaceHorizontal Method

DrawUtilsDrawSurfaceHorizontal Method
Just like DrawSurface, but will stretch texture on Y axis.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void DrawSurfaceHorizontal(
    SpriteBatch spriteBatch,
    Texture2D texture,
    Rectangle destination,
    float frameWidth,
    Nullable<Color> color = null,
    float frameScale = 1f
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
texture
Type: Texture2D
Texture to draw.
destination
Type: Rectangle
Destination rectangle.
frameWidth
Type: SystemSingle
Frame width in percents relative to texture file size. For example, 0.1 means the frame takes 10% of the texture file.
color (Optional)
Type: SystemNullable Color
Optional tint color to draw texture with.
frameScale (Optional)
Type: SystemSingle
Optional scale for the frame part.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.DrawSurfaceVertical Method

DrawUtilsDrawSurfaceVertical Method
Just like DrawSurface, but will stretch texture on X axis.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void DrawSurfaceVertical(
    SpriteBatch spriteBatch,
    Texture2D texture,
    Rectangle destination,
    float frameWidth,
    Nullable<Color> color = null,
    float frameScale = 1f
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
texture
Type: Texture2D
Texture to draw.
destination
Type: Rectangle
Destination rectangle.
frameWidth
Type: SystemSingle
Frame width in percents relative to texture file size. For example, 0.1 means the frame takes 10% of the texture file.
color (Optional)
Type: SystemNullable Color
Optional tint color to draw texture with.
frameScale (Optional)
Type: SystemSingle
Optional scale for the frame part.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.EndDraw Method

DrawUtilsEndDraw Method
Finish drawing on a given SpriteBatch

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void EndDraw(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.FixColorOpacity Method

DrawUtilsFixColorOpacity Method
Overload List
 | Name | Description
Public method | FixColorOpacity(Color) | Fix RGB based on Alpha channel.
Public method | FixColorOpacity(NullableColor) | Set default color to white and fix RGB based on Alpha channel.
Top
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.FixColorOpacity Method (Color)

DrawUtilsFixColorOpacity Method (Color)
Fix RGB based on Alpha channel.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Color FixColorOpacity(
    Color color
)

Parameters

color
Type: Color
Color to process.

Return Value

Type: Color
Color if provided or default color, with alpha applied.
See Also

Reference

DrawUtils Class
FixColorOpacity Overload
GeonBit.UI Namespace


DrawUtils.FixColorOpacity Method (Nullable(Color))

DrawUtilsFixColorOpacity Method (NullableColor)
Set default color to white and fix RGB based on Alpha channel.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Color FixColorOpacity(
    Nullable<Color> color
)

Parameters

color
Type: SystemNullable Color
Color to process.

Return Value

Type: Color
Color if provided or default color, with alpha applied.
See Also

Reference

DrawUtils Class
FixColorOpacity Overload
GeonBit.UI Namespace


DrawUtils.PopRenderTarget Method

DrawUtilsPopRenderTarget Method
Pop a render target from the render targets stack.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void PopRenderTarget()
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.PushRenderTarget Method

DrawUtilsPushRenderTarget Method
Add a render target to the render targets stack.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void PushRenderTarget(
    RenderTarget2D target
)

Parameters

target
Type: RenderTarget2D

[Missing <param name="target"/> documentation for "M:GeonBit.UI.DrawUtils.PushRenderTarget(Microsoft.Xna.Framework.Graphics.RenderTarget2D)"]

See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.ScaleRect Method

DrawUtilsScaleRect Method
Scale a rectangle by given factor

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Rectangle ScaleRect(
    Rectangle rect,
    float scale
)

Parameters

rect
Type: Rectangle
Rectangle to scale.
scale
Type: SystemSingle
By how much to scale the rectangle.

Return Value

Type: Rectangle
Scaled rectangle.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.StartDraw Method

DrawUtilsStartDraw Method
Start drawing on a given SpriteBatch.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void StartDraw(
    SpriteBatch spriteBatch,
    bool isDisabled
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
isDisabled
Type: SystemBoolean
If true, will use the greyscale 'disabled' effect.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


DrawUtils.StartDrawSilhouette Method

DrawUtilsStartDrawSilhouette Method
Start drawing on a given SpriteBatch, but only draw colored Silhouette of the texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void StartDrawSilhouette(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
See Also

Reference

DrawUtils Class
GeonBit.UI Namespace


EventCallback Delegate

EventCallback Delegate
A callback function you can register on entity events, like on-click, on-mouse-leave, etc.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public delegate void EventCallback(
    Entity entity
)

Parameters

entity
Type: GeonBit.UI.EntitiesEntity
The entity instance the event came from.
See Also

Reference

GeonBit.UI Namespace


GenerateTooltipFunc Delegate

GenerateTooltipFunc Delegate
A function used to generate tooltip entity. Used when the user points on an entity with a tooltip text and show present it.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public delegate Entity GenerateTooltipFunc(
    Entity entity
)

Parameters

entity
Type: GeonBit.UI.EntitiesEntity
The entity instance the tooltip came from.

Return Value

Type: Entity
See Also

Reference

GeonBit.UI Namespace


InputHelper Class

InputHelper Class
Provide easier keyboard and mouse access, keyboard text input, and other user input utils.
Inheritance Hierarchy
SystemObject
GeonBit.UIInputHelper

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class InputHelper

The InputHelper type exposes the following members.

Constructors
 | Name | Description
Public method | InputHelper | Create the input helper.
Top
Properties
 | Name | Description
Public property | CurrGameTime | Current frame game time.
Public property | MousePosition | Get current mouse poisition.
Public property | MousePositionDiff | Get mouse position change since last frame.
Top
Methods
 | Name | Description
Public method | AnyMouseButtonDown | Return if any of mouse buttons is down.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetTextInput | Get textual input from keyboard. If user enter keys it will push them into string, if delete or backspace will remove chars, etc. This also handles keyboard cooldown, to make it feel like windows-input.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsKeyDown | Check if a given keyboard key is down.
Public method | IsKeyReleased | Check if a given keyboard key was previously pressed down and now released in this frame.
Public method | MouseButtonClick | Check if a given mouse button was just clicked (eg released after being pressed down)
Public method | MouseButtonDown | Check if a given mouse button is down.
Public method | MouseButtonPressed | Check if a given mouse button was pressed in current frame.
Public method | MouseButtonReleased | Check if a given mouse button was released in current frame.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | TransformCursorPos | Calculate and return current cursor position transformed by a matrix.
Public method | Update | Update current states. If used outside GeonBit.UI, this function should be called first thing inside your game 'Update()' function, and before you make any use of this class.
Public method | UpdateCursorPosition | Move the cursor to be at the center of the screen.
Top
Fields
 | Name | Description
Public field | KeysTypeCooldown | An artificial "lag" after a key is pressed when typing text input, to prevent mistake duplications.
Public field | MouseWheel | Current mouse wheel value.
Public field | MouseWheelChange | Mouse wheel change sign (eg 0, 1 or -1) since last frame.
Top
See Also

Reference

GeonBit.UI Namespace


InputHelper Constructor

InputHelper Constructor
Create the input helper.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InputHelper()
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper Properties

InputHelper Properties

The InputHelper type exposes the following members.

Properties
 | Name | Description
Public property | CurrGameTime | Current frame game time.
Public property | MousePosition | Get current mouse poisition.
Public property | MousePositionDiff | Get mouse position change since last frame.
Top
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.CurrGameTime Property

InputHelperCurrGameTime Property
Current frame game time.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public GameTime CurrGameTime { get; }

Property Value

Type: GameTime
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MousePosition Property

InputHelperMousePosition Property
Get current mouse poisition.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 MousePosition { get; }

Property Value

Type: Vector2
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MousePositionDiff Property

InputHelperMousePositionDiff Property
Get mouse position change since last frame.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 MousePositionDiff { get; }

Property Value

Type: Vector2
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper Methods

InputHelper Methods

The InputHelper type exposes the following members.

Methods
 | Name | Description
Public method | AnyMouseButtonDown | Return if any of mouse buttons is down.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetTextInput | Get textual input from keyboard. If user enter keys it will push them into string, if delete or backspace will remove chars, etc. This also handles keyboard cooldown, to make it feel like windows-input.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsKeyDown | Check if a given keyboard key is down.
Public method | IsKeyReleased | Check if a given keyboard key was previously pressed down and now released in this frame.
Public method | MouseButtonClick | Check if a given mouse button was just clicked (eg released after being pressed down)
Public method | MouseButtonDown | Check if a given mouse button is down.
Public method | MouseButtonPressed | Check if a given mouse button was pressed in current frame.
Public method | MouseButtonReleased | Check if a given mouse button was released in current frame.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | TransformCursorPos | Calculate and return current cursor position transformed by a matrix.
Public method | Update | Update current states. If used outside GeonBit.UI, this function should be called first thing inside your game 'Update()' function, and before you make any use of this class.
Public method | UpdateCursorPosition | Move the cursor to be at the center of the screen.
Top
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.AnyMouseButtonDown Method

InputHelperAnyMouseButtonDown Method
Return if any of mouse buttons is down.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AnyMouseButtonDown()

Return Value

Type: Boolean
True if any mouse button is currently down.
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.GetTextInput Method

InputHelperGetTextInput Method
Get textual input from keyboard. If user enter keys it will push them into string, if delete or backspace will remove chars, etc. This also handles keyboard cooldown, to make it feel like windows-input.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string GetTextInput(
    string txt,
    ref int pos
)

Parameters

txt
Type: SystemString
String to push text input into.
pos
Type: SystemInt32
Position to insert / remove characters. -1 to push at the end of string. After done, will contain actual new caret position.

Return Value

Type: String
String after text input applied on it.
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.IsKeyDown Method

InputHelperIsKeyDown Method
Check if a given keyboard key is down.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsKeyDown(
    Keys key
)

Parameters

key
Type: Keys
Key button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.IsKeyDown(Microsoft.Xna.Framework.Input.Keys)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.IsKeyReleased Method

InputHelperIsKeyReleased Method
Check if a given keyboard key was previously pressed down and now released in this frame.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsKeyReleased(
    Keys key
)

Parameters

key
Type: Keys
Key button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseButtonClick Method

InputHelperMouseButtonClick Method
Check if a given mouse button was just clicked (eg released after being pressed down)

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool MouseButtonClick(
    MouseButton button = MouseButton.Left
)

Parameters

button (Optional)
Type: GeonBit.UIMouseButton
Mouse button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.MouseButtonClick(GeonBit.UI.MouseButton)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseButtonDown Method

InputHelperMouseButtonDown Method
Check if a given mouse button is down.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool MouseButtonDown(
    MouseButton button = MouseButton.Left
)

Parameters

button (Optional)
Type: GeonBit.UIMouseButton
Mouse button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.MouseButtonDown(GeonBit.UI.MouseButton)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseButtonPressed Method

InputHelperMouseButtonPressed Method
Check if a given mouse button was pressed in current frame.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool MouseButtonPressed(
    MouseButton button = MouseButton.Left
)

Parameters

button (Optional)
Type: GeonBit.UIMouseButton
Mouse button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.MouseButtonPressed(GeonBit.UI.MouseButton)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseButtonReleased Method

InputHelperMouseButtonReleased Method
Check if a given mouse button was released in current frame.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool MouseButtonReleased(
    MouseButton button = MouseButton.Left
)

Parameters

button (Optional)
Type: GeonBit.UIMouseButton
Mouse button to check.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:GeonBit.UI.InputHelper.MouseButtonReleased(GeonBit.UI.MouseButton)"]

See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.TransformCursorPos Method

InputHelperTransformCursorPos Method
Calculate and return current cursor position transformed by a matrix.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 TransformCursorPos(
    Nullable<Matrix> transform
)

Parameters

transform
Type: SystemNullable Matrix
Matrix to transform cursor position by.

Return Value

Type: Vector2
Cursor position with optional transform applied.
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.Update Method

InputHelperUpdate Method
Update current states. If used outside GeonBit.UI, this function should be called first thing inside your game 'Update()' function, and before you make any use of this class.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Update(
    GameTime gameTime
)

Parameters

gameTime
Type: GameTime
Current game time.
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.UpdateCursorPosition Method

InputHelperUpdateCursorPosition Method
Move the cursor to be at the center of the screen.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void UpdateCursorPosition(
    Vector2 pos
)

Parameters

pos
Type: Vector2
New mouse position.
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper Fields

InputHelper Fields

The InputHelper type exposes the following members.

Fields
 | Name | Description
Public field | KeysTypeCooldown | An artificial "lag" after a key is pressed when typing text input, to prevent mistake duplications.
Public field | MouseWheel | Current mouse wheel value.
Public field | MouseWheelChange | Mouse wheel change sign (eg 0, 1 or -1) since last frame.
Top
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.KeysTypeCooldown Field

InputHelperKeysTypeCooldown Field
An artificial "lag" after a key is pressed when typing text input, to prevent mistake duplications.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float KeysTypeCooldown

Field Value

Type: Single
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseWheel Field

InputHelperMouseWheel Field
Current mouse wheel value.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int MouseWheel

Field Value

Type: Int32
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


InputHelper.MouseWheelChange Field

InputHelperMouseWheelChange Field
Mouse wheel change sign (eg 0, 1 or -1) since last frame.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int MouseWheelChange

Field Value

Type: Int32
See Also

Reference

InputHelper Class
GeonBit.UI Namespace


MouseButton Enumeration

MouseButton Enumeration
Supported mouse buttons.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum MouseButton
Members
Member name | Value | Description
Left | 0 | Left mouse button.
Right | 1 | Right mouse button.
Middle | 2 | Middle mouse button (eg scrollwheel when clicked).
See Also

Reference

GeonBit.UI Namespace


Resources Class

Resources Class
A static class to init and store all UI resources (textures, effects, fonts, etc.)
Inheritance Hierarchy
SystemObject
GeonBit.UIResources

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class Resources

The Resources type exposes the following members.

Properties
Name | Description
ArrowDown | Arrow-down texture (used in dropdown).
ArrowUp | Arrow-up texture (used in dropdown).
HorizontalLineTexture | HorizontalLine texture.
IconBackgroundTexture | Icons inventory background texture.
ProgressBarFillTexture | ProgressBar fill texture.
ProgressBarTexture | ProgressBar texture.
VerticalScrollbarMarkTexture | Vertical scrollbar mark texture.
VerticalScrollbarTexture | Vertical scrollbar base texture.
WhiteTexture | Just a plain white texture, used internally.
Top
Methods
Name | Description
LoadContent | Load all GeonBit.UI resources.
Top
Fields
Name | Description
ButtonData | Metadata about button textures.
ButtonTextures | Button textures (accessed as [skin, state]).
CheckBoxTextures | CheckBox textures.
Cursors | Cursor textures.
CursorsData | Metadata about cursor textures.
DisabledEffect | Effect for disabled entities (greyscale).
Fonts | Default font types.
IconTextures | All icon textures.
PanelData | Metadata about panel textures.
PanelTextures | All panel skin textures.
ProgressBarData | Metadata about progressbar texture.
RadioTextures | Radio button textures.
SilhouetteEffect | An effect to draw just a silhouette of the texture.
SliderData | Metadata about slider textures.
SliderMarkTextures | Sliders mark textures (the sliding piece that shows current value).
SliderTextures | Sliders base textures.
VerticalScrollbarData | Metadata about scrollbar texture.
Top
See Also

Reference

GeonBit.UI Namespace


Resources Properties

Resources Properties

The Resources type exposes the following members.

Properties
Name | Description
ArrowDown | Arrow-down texture (used in dropdown).
ArrowUp | Arrow-up texture (used in dropdown).
HorizontalLineTexture | HorizontalLine texture.
IconBackgroundTexture | Icons inventory background texture.
ProgressBarFillTexture | ProgressBar fill texture.
ProgressBarTexture | ProgressBar texture.
VerticalScrollbarMarkTexture | Vertical scrollbar mark texture.
VerticalScrollbarTexture | Vertical scrollbar base texture.
WhiteTexture | Just a plain white texture, used internally.
Top
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ArrowDown Property

ResourcesArrowDown Property
Arrow-down texture (used in dropdown).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D ArrowDown { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ArrowUp Property

ResourcesArrowUp Property
Arrow-up texture (used in dropdown).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D ArrowUp { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.HorizontalLineTexture Property

ResourcesHorizontalLineTexture Property
HorizontalLine texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D HorizontalLineTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.IconBackgroundTexture Property

ResourcesIconBackgroundTexture Property
Icons inventory background texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D IconBackgroundTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ProgressBarFillTexture Property

ResourcesProgressBarFillTexture Property
ProgressBar fill texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D ProgressBarFillTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ProgressBarTexture Property

ResourcesProgressBarTexture Property
ProgressBar texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D ProgressBarTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.VerticalScrollbarMarkTexture Property

ResourcesVerticalScrollbarMarkTexture Property
Vertical scrollbar mark texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D VerticalScrollbarMarkTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.VerticalScrollbarTexture Property

ResourcesVerticalScrollbarTexture Property
Vertical scrollbar base texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D VerticalScrollbarTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.WhiteTexture Property

ResourcesWhiteTexture Property
Just a plain white texture, used internally.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Texture2D WhiteTexture { get; }

Property Value

Type: Texture2D
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources Methods

Resources Methods

The Resources type exposes the following members.

Methods
Name | Description
LoadContent | Load all GeonBit.UI resources.
Top
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.LoadContent Method

ResourcesLoadContent Method
Load all GeonBit.UI resources.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void LoadContent(
    ContentManager content,
    string theme = "default"
)

Parameters

content
Type: ContentManager
Content manager to use.
theme (Optional)
Type: SystemString
Which theme to load resources from.
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources Fields

Resources Fields

The Resources type exposes the following members.

Fields
Name | Description
ButtonData | Metadata about button textures.
ButtonTextures | Button textures (accessed as [skin, state]).
CheckBoxTextures | CheckBox textures.
Cursors | Cursor textures.
CursorsData | Metadata about cursor textures.
DisabledEffect | Effect for disabled entities (greyscale).
Fonts | Default font types.
IconTextures | All icon textures.
PanelData | Metadata about panel textures.
PanelTextures | All panel skin textures.
ProgressBarData | Metadata about progressbar texture.
RadioTextures | Radio button textures.
SilhouetteEffect | An effect to draw just a silhouette of the texture.
SliderData | Metadata about slider textures.
SliderMarkTextures | Sliders mark textures (the sliding piece that shows current value).
SliderTextures | Sliders base textures.
VerticalScrollbarData | Metadata about scrollbar texture.
Top
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ButtonData Field

ResourcesButtonData Field
Metadata about button textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TextureData[] ButtonData

Field Value

Type: TextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ButtonTextures Field

ResourcesButtonTextures Field
Button textures (accessed as [skin, state]).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<ButtonSkin> ButtonTextures

Field Value

Type: TexturesGetter ButtonSkin
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.CheckBoxTextures Field

ResourcesCheckBoxTextures Field
CheckBox textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<EntityState> CheckBoxTextures

Field Value

Type: TexturesGetter EntityState
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.Cursors Field

ResourcesCursors Field
Cursor textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<CursorType> Cursors

Field Value

Type: TexturesGetter CursorType
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.CursorsData Field

ResourcesCursorsData Field
Metadata about cursor textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static CursorTextureData[] CursorsData

Field Value

Type: CursorTextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.DisabledEffect Field

ResourcesDisabledEffect Field
Effect for disabled entities (greyscale).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Effect DisabledEffect

Field Value

Type: Effect
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.Fonts Field

ResourcesFonts Field
Default font types.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static SpriteFont[] Fonts

Field Value

Type: SpriteFont
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.IconTextures Field

ResourcesIconTextures Field
All icon textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<IconType> IconTextures

Field Value

Type: TexturesGetter IconType
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.PanelData Field

ResourcesPanelData Field
Metadata about panel textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TextureData[] PanelData

Field Value

Type: TextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.PanelTextures Field

ResourcesPanelTextures Field
All panel skin textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<PanelSkin> PanelTextures

Field Value

Type: TexturesGetter PanelSkin
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.ProgressBarData Field

ResourcesProgressBarData Field
Metadata about progressbar texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TextureData ProgressBarData

Field Value

Type: TextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.RadioTextures Field

ResourcesRadioTextures Field
Radio button textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<EntityState> RadioTextures

Field Value

Type: TexturesGetter EntityState
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.SilhouetteEffect Field

ResourcesSilhouetteEffect Field
An effect to draw just a silhouette of the texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Effect SilhouetteEffect

Field Value

Type: Effect
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.SliderData Field

ResourcesSliderData Field
Metadata about slider textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TextureData[] SliderData

Field Value

Type: TextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.SliderMarkTextures Field

ResourcesSliderMarkTextures Field
Sliders mark textures (the sliding piece that shows current value).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<SliderSkin> SliderMarkTextures

Field Value

Type: TexturesGetter SliderSkin
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.SliderTextures Field

ResourcesSliderTextures Field
Sliders base textures.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TexturesGetter<SliderSkin> SliderTextures

Field Value

Type: TexturesGetter SliderSkin
See Also

Reference

Resources Class
GeonBit.UI Namespace


Resources.VerticalScrollbarData Field

ResourcesVerticalScrollbarData Field
Metadata about scrollbar texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static TextureData VerticalScrollbarData

Field Value

Type: TextureData
See Also

Reference

Resources Class
GeonBit.UI Namespace


TexturesGetter(TEnum) Class

TexturesGetterTEnum Class
A class to get texture with index and constant path part. Used internally.
Inheritance Hierarchy
SystemObject
GeonBit.UITexturesGetterTEnum

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TexturesGetter<TEnum>
where TEnum : IConvertible

Type Parameters

TEnum

The TexturesGetterTEnum type exposes the following members.

Constructors
 | Name | Description
Public method | TexturesGetterTEnum | Create the texture getter with base path.
Top
Properties
 | Name | Description
Public property | ItemTEnum | Get texture for enum state. This is for textures that don't have different states, like mouse hover, down, or default.
Public property | ItemTEnum, EntityState | Get texture for enum state and entity state. This is for textures that don't have different states, like mouse hover, down, or default.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

GeonBit.UI Namespace


TexturesGetter(TEnum) Constructor

TexturesGetterTEnum Constructor
Create the texture getter with base path.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TexturesGetter(
    string path,
    string suffix = null,
    bool usesStates = true
)

Parameters

path
Type: SystemString
Resource path, under geonbit.ui content.
suffix (Optional)
Type: SystemString
Suffix to add to the texture path after the enum part.
usesStates (Optional)
Type: SystemBoolean
If true, it means these textures may also use entit states, eg mouse hover / down / default.
See Also

Reference

TexturesGetterTEnum Class
GeonBit.UI Namespace


TexturesGetter(TEnum) Properties

TexturesGetterTEnum Properties
Properties
 | Name | Description
Public property | ItemTEnum | Get texture for enum state. This is for textures that don't have different states, like mouse hover, down, or default.
Public property | ItemTEnum, EntityState | Get texture for enum state and entity state. This is for textures that don't have different states, like mouse hover, down, or default.
Top
See Also

Reference

TexturesGetterTEnum Class
GeonBit.UI Namespace


TexturesGetter(TEnum).Item Property

TexturesGetterTEnumItem Property
Overload List
 | Name | Description
Public property | ItemTEnum | Get texture for enum state. This is for textures that don't have different states, like mouse hover, down, or default.
Public property | ItemTEnum, EntityState | Get texture for enum state and entity state. This is for textures that don't have different states, like mouse hover, down, or default.
Top
See Also

Reference

TexturesGetterTEnum Class
GeonBit.UI Namespace


TexturesGetter(TEnum).Item Property (TEnum)

TexturesGetterTEnumItem Property (TEnum)
Get texture for enum state. This is for textures that don't have different states, like mouse hover, down, or default.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Texture2D this[
    TEnum i
] { get; set; }

Parameters

i
Type: TEnum
Texture enum identifier.

Return Value

Type: Texture2D
Loaded texture.
See Also

Reference

TexturesGetterTEnum Class
Item Overload
GeonBit.UI Namespace


TexturesGetter(TEnum).Item Property (TEnum, EntityState)

TexturesGetterTEnumItem Property (TEnum, EntityState)
Get texture for enum state and entity state. This is for textures that don't have different states, like mouse hover, down, or default.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Texture2D this[
    TEnum i,
    EntityState s
] { get; set; }

Parameters

i
Type: TEnum
Texture enum identifier.
s
Type: GeonBit.UI.EntitiesEntityState
Entity state to get texture for.

Return Value

Type: Texture2D
Loaded texture.
See Also

Reference

TexturesGetterTEnum Class
Item Overload
GeonBit.UI Namespace


TexturesGetter(TEnum) Methods

TexturesGetterTEnum Methods

The TexturesGetterTEnum generic type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

TexturesGetterTEnum Class
GeonBit.UI Namespace


UserInterface Class

UserInterface Class
Main GeonBit.UI class that manage and draw all the UI entities. This is the main manager you use to update, draw, and add entities to.
Inheritance Hierarchy
SystemObject
GeonBit.UIUserInterface

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class UserInterface : IDisposable

The UserInterface type exposes the following members.

Constructors
 | Name | Description
Public method | UserInterface | Create the user interface instance.
Top
Properties
 | Name | Description
Public property | GlobalScale | Scale the entire UI and all the entities in it. This is useful for smaller device screens.
Public property | RenderTarget | Get the main render target all the UI draws on.
Public property | Root | Get the root entity.
Public property | TargetEntity | The current target entity, eg what cursor points on. Can be null if cursor don't point on any entity.
Public property | UseRenderTarget | If true, will draw the UI on a render target before drawing on screen. This mode is required for some of the features.
Top
Methods
 | Name | Description
Public method | AddEntity | Add an entity to screen.
Public method | Clear | Remove all entities from screen.
Public method | Dispose | Dispose unmanaged resources of this user interface.
Public method | Draw | Draw the UI. This function should be called from your Game 'Draw()' function. Note: if UseRenderTarget is true, this function should be called FIRST in your draw function. If UseRenderTarget is false, this function should be called LAST in your draw function.
Public method | DrawCursor | Draw the cursor.
Public method | DrawMainRenderTarget | Finalize the draw frame and draw all the UI on screen. This function only works if we are in UseRenderTarget mode.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetTransformedCursorPos | Get transformed cursoer position for collision detection. If have transform matrix and curser is included in render target, will transform cursor position too. If don't use transform matrix or drawing cursor outside, will not transform cursor position.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
 | Initialize(ContentManager, BuiltinThemes) | Initialize UI manager (mostly load resources and set some defaults).
 | Initialize(ContentManager, String) | Initialize UI manager (mostly load resources and set some defaults).
Public method | RemoveEntity | Remove an entity from screen.
Public method | SetCursor(CursorType) | Set cursor style.
Public method | SetCursor(Texture2D, Int32, NullablePoint) | Set cursor graphics from a custom texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Update the UI manager. This function should be called from your Game 'Update()' function, as early as possible (eg before you update your game state).
Top
Fields
 | Name | Description
 | Active | The currently active user interface instance.
Public field | ActiveEntity | Current active entity, eg last entity user interacted with.
Public field | AfterDraw | Callback to execute every frame after entity is rendered.
Public field | AfterUpdate | Callback to execute every frame after entity update.
Public field | BeforeDraw | Callback to execute every frame before entity is rendered.
Public field | BeforeUpdate | Callback to execute every frame before entity update.
Public field | BlendState | Blend state to use when rendering UI.
Public field | CursorScale | Cursor rendering size.
 | DefaultParagraph | Create a default paragraph instance. GeonBit.UI entities use this method when need to create a paragraph, so you can override this to change which paragraph type the built-in entities will use by-default (for example Buttons text, SelectList items, etc.).
Public field | DrawUtils | Draw utils helper. Contain general drawing functionality and handle effects replacement.
Public field | GenerateTooltipFunc | The function used to generate tooltip text on entities.
Public field | IncludeCursorInRenderTarget | If using render targets, should the curser be rendered inside of it? If false, cursor will draw outside the render target, when presenting it.
Public field | OnClick | Callback to execute when user clicks on an entity (eg release mouse over it).
Public field | OnEntitySpawn | Callback to execute every time a new entity is spawned (note: spawn = first time Update() is called on this entity).
Public field | OnFocusChange | Callback to execute every time an entity focus changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over an entity (called once when button is pressed).
Public field | OnMouseEnter | Callback to execute when mouse start hovering over an entity (eg enters its region).
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over an entity (eg leaves its region).
Public field | OnMouseReleased | Callback to execute when mouse button is released over an entity (called once when button is released).
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and an entity is the active entity.
Public field | OnRightClick | Callback to execute when user clicks on an entity with right mouse button (eg release mouse over it).
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over an entity (called once when button is pressed).
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable).
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable).
Public field | OnValueChange | Callback to execute when any entity value changes (relevant only for entities with value).
Public field | OnVisiblityChange | Callback to execute every time the visibility property of an entity change.
Public field | RenderTargetTransformMatrix | Optional transformation matrix to apply when drawing with render targets.
Public field | SamplerState | Sampler state to use when rendering UI.
Public field | ScreenHeight | Screen height.
Public field | ScreenWidth | Screen width.
Public field | ShowCursor | Weather or not to draw the cursor.
Public field | SilentSoftErrors | If true, GeonBit.UI will not raise exceptions on sanity checks, validations, and errors which are not critical. For example, trying to select a value that doesn't exist from a list would do nothing instead of throwing exception.
 | TimeToShowTooltipText | How long to wait before showing tooltip texts.
 | VERSION | Current GeonBit.UI version identifier.
Public field | WhileDragging | Called every frame while entity is being dragged.
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over an entity.
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over an entity, unless mouse button is down.
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over an entity, even if mouse button is down.
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over an entity.
Top
See Also

Reference

GeonBit.UI Namespace


UserInterface Constructor

UserInterface Constructor
Create the user interface instance.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public UserInterface()
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface Properties

UserInterface Properties

The UserInterface type exposes the following members.

Properties
 | Name | Description
Public property | GlobalScale | Scale the entire UI and all the entities in it. This is useful for smaller device screens.
Public property | RenderTarget | Get the main render target all the UI draws on.
Public property | Root | Get the root entity.
Public property | TargetEntity | The current target entity, eg what cursor points on. Can be null if cursor don't point on any entity.
Public property | UseRenderTarget | If true, will draw the UI on a render target before drawing on screen. This mode is required for some of the features.
Top
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.GlobalScale Property

UserInterfaceGlobalScale Property
Scale the entire UI and all the entities in it. This is useful for smaller device screens.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float GlobalScale { get; set; }

Property Value

Type: Single
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.RenderTarget Property

UserInterfaceRenderTarget Property
Get the main render target all the UI draws on.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public RenderTarget2D RenderTarget { get; }

Property Value

Type: RenderTarget2D
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Root Property

UserInterfaceRoot Property
Get the root entity.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public RootPanel Root { get; }

Property Value

Type: RootPanel
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.TargetEntity Property

UserInterfaceTargetEntity Property
The current target entity, eg what cursor points on. Can be null if cursor don't point on any entity.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity TargetEntity { get; }

Property Value

Type: Entity
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.UseRenderTarget Property

UserInterfaceUseRenderTarget Property
If true, will draw the UI on a render target before drawing on screen. This mode is required for some of the features.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool UseRenderTarget { get; set; }

Property Value

Type: Boolean
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface Methods

UserInterface Methods

The UserInterface type exposes the following members.

Methods
 | Name | Description
Public method | AddEntity | Add an entity to screen.
Public method | Clear | Remove all entities from screen.
Public method | Dispose | Dispose unmanaged resources of this user interface.
Public method | Draw | Draw the UI. This function should be called from your Game 'Draw()' function. Note: if UseRenderTarget is true, this function should be called FIRST in your draw function. If UseRenderTarget is false, this function should be called LAST in your draw function.
Public method | DrawCursor | Draw the cursor.
Public method | DrawMainRenderTarget | Finalize the draw frame and draw all the UI on screen. This function only works if we are in UseRenderTarget mode.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetTransformedCursorPos | Get transformed cursoer position for collision detection. If have transform matrix and curser is included in render target, will transform cursor position too. If don't use transform matrix or drawing cursor outside, will not transform cursor position.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
 | Initialize(ContentManager, BuiltinThemes) | Initialize UI manager (mostly load resources and set some defaults).
 | Initialize(ContentManager, String) | Initialize UI manager (mostly load resources and set some defaults).
Public method | RemoveEntity | Remove an entity from screen.
Public method | SetCursor(CursorType) | Set cursor style.
Public method | SetCursor(Texture2D, Int32, NullablePoint) | Set cursor graphics from a custom texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Update the UI manager. This function should be called from your Game 'Update()' function, as early as possible (eg before you update your game state).
Top
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.AddEntity Method

UserInterfaceAddEntity Method
Add an entity to screen.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity AddEntity(
    Entity entity
)

Parameters

entity
Type: GeonBit.UI.EntitiesEntity
Entity to add.

Return Value

Type: Entity

[Missing <returns> documentation for "M:GeonBit.UI.UserInterface.AddEntity(GeonBit.UI.Entities.Entity)"]

See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Clear Method

UserInterfaceClear Method
Remove all entities from screen.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Clear()
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Dispose Method

UserInterfaceDispose Method
Dispose unmanaged resources of this user interface.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Draw Method

UserInterfaceDraw Method
Draw the UI. This function should be called from your Game 'Draw()' function. Note: if UseRenderTarget is true, this function should be called FIRST in your draw function. If UseRenderTarget is false, this function should be called LAST in your draw function.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Draw(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw on.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.DrawCursor Method

UserInterfaceDrawCursor Method
Draw the cursor.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void DrawCursor(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to draw the cursor.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.DrawMainRenderTarget Method

UserInterfaceDrawMainRenderTarget Method
Finalize the draw frame and draw all the UI on screen. This function only works if we are in UseRenderTarget mode.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void DrawMainRenderTarget(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
Sprite batch to draw on.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.GetTransformedCursorPos Method

UserInterfaceGetTransformedCursorPos Method
Get transformed cursoer position for collision detection. If have transform matrix and curser is included in render target, will transform cursor position too. If don't use transform matrix or drawing cursor outside, will not transform cursor position.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 GetTransformedCursorPos(
    Nullable<Vector2> addVector
)

Parameters

addVector
Type: SystemNullable Vector2

[Missing <param name="addVector"/> documentation for "M:GeonBit.UI.UserInterface.GetTransformedCursorPos(System.Nullable{Microsoft.Xna.Framework.Vector2})"]

Return Value

Type: Vector2
Transformed cursor position.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Initialize Method

UserInterfaceInitialize Method
Overload List
Name | Description
Initialize(ContentManager, BuiltinThemes) | Initialize UI manager (mostly load resources and set some defaults).
Initialize(ContentManager, String) | Initialize UI manager (mostly load resources and set some defaults).
Top
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Initialize Method (ContentManager, BuiltinThemes)

UserInterfaceInitialize Method (ContentManager, BuiltinThemes)
Initialize UI manager (mostly load resources and set some defaults).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void Initialize(
    ContentManager contentManager,
    BuiltinThemes theme
)

Parameters

contentManager
Type: ContentManager
Content manager.
theme
Type: GeonBit.UIBuiltinThemes
Which UI theme to use. This affect the appearance of all textures and effects.
See Also

Reference

UserInterface Class
Initialize Overload
GeonBit.UI Namespace


UserInterface.Initialize Method (ContentManager, String)

UserInterfaceInitialize Method (ContentManager, String)
Initialize UI manager (mostly load resources and set some defaults).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void Initialize(
    ContentManager contentManager,
    string theme = "hd"
)

Parameters

contentManager
Type: ContentManager
Content manager.
theme (Optional)
Type: SystemString
Which UI theme to use (see options in Content/GeonBit.UI/themes/). This affect the appearance of all textures and effects.
See Also

Reference

UserInterface Class
Initialize Overload
GeonBit.UI Namespace


UserInterface.RemoveEntity Method

UserInterfaceRemoveEntity Method
Remove an entity from screen.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveEntity(
    Entity entity
)

Parameters

entity
Type: GeonBit.UI.EntitiesEntity
Entity to remove.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.SetCursor Method

UserInterfaceSetCursor Method
Overload List
 | Name | Description
Public method | SetCursor(CursorType) | Set cursor style.
Public method | SetCursor(Texture2D, Int32, NullablePoint) | Set cursor graphics from a custom texture.
Top
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.SetCursor Method (CursorType)

UserInterfaceSetCursor Method (CursorType)
Set cursor style.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetCursor(
    CursorType type
)

Parameters

type
Type: GeonBit.UICursorType
What type of cursor to show.
See Also

Reference

UserInterface Class
SetCursor Overload
GeonBit.UI Namespace


UserInterface.SetCursor Method (Texture2D, Int32, Nullable(Point))

UserInterfaceSetCursor Method (Texture2D, Int32, NullablePoint)
Set cursor graphics from a custom texture.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetCursor(
    Texture2D texture,
    int drawWidth = 32,
    Nullable<Point> offset = null
)

Parameters

texture
Type: Texture2D
Texture to use for cursor.
drawWidth (Optional)
Type: SystemInt32
Width, in pixels to draw the cursor. Height will be calculated automatically to fit texture propotions.
offset (Optional)
Type: SystemNullable Point
Cursor offset from mouse position (if not provided will draw cursor with top-left corner on mouse position).
See Also

Reference

UserInterface Class
SetCursor Overload
GeonBit.UI Namespace


UserInterface.Update Method

UserInterfaceUpdate Method
Update the UI manager. This function should be called from your Game 'Update()' function, as early as possible (eg before you update your game state).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Update(
    GameTime gameTime
)

Parameters

gameTime
Type: GameTime
Current game time.
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface Fields

UserInterface Fields

The UserInterface type exposes the following members.

Fields
 | Name | Description
 | Active | The currently active user interface instance.
Public field | ActiveEntity | Current active entity, eg last entity user interacted with.
Public field | AfterDraw | Callback to execute every frame after entity is rendered.
Public field | AfterUpdate | Callback to execute every frame after entity update.
Public field | BeforeDraw | Callback to execute every frame before entity is rendered.
Public field | BeforeUpdate | Callback to execute every frame before entity update.
Public field | BlendState | Blend state to use when rendering UI.
Public field | CursorScale | Cursor rendering size.
 | DefaultParagraph | Create a default paragraph instance. GeonBit.UI entities use this method when need to create a paragraph, so you can override this to change which paragraph type the built-in entities will use by-default (for example Buttons text, SelectList items, etc.).
Public field | DrawUtils | Draw utils helper. Contain general drawing functionality and handle effects replacement.
Public field | GenerateTooltipFunc | The function used to generate tooltip text on entities.
Public field | IncludeCursorInRenderTarget | If using render targets, should the curser be rendered inside of it? If false, cursor will draw outside the render target, when presenting it.
Public field | OnClick | Callback to execute when user clicks on an entity (eg release mouse over it).
Public field | OnEntitySpawn | Callback to execute every time a new entity is spawned (note: spawn = first time Update() is called on this entity).
Public field | OnFocusChange | Callback to execute every time an entity focus changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over an entity (called once when button is pressed).
Public field | OnMouseEnter | Callback to execute when mouse start hovering over an entity (eg enters its region).
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over an entity (eg leaves its region).
Public field | OnMouseReleased | Callback to execute when mouse button is released over an entity (called once when button is released).
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and an entity is the active entity.
Public field | OnRightClick | Callback to execute when user clicks on an entity with right mouse button (eg release mouse over it).
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over an entity (called once when button is pressed).
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable).
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable).
Public field | OnValueChange | Callback to execute when any entity value changes (relevant only for entities with value).
Public field | OnVisiblityChange | Callback to execute every time the visibility property of an entity change.
Public field | RenderTargetTransformMatrix | Optional transformation matrix to apply when drawing with render targets.
Public field | SamplerState | Sampler state to use when rendering UI.
Public field | ScreenHeight | Screen height.
Public field | ScreenWidth | Screen width.
Public field | ShowCursor | Weather or not to draw the cursor.
Public field | SilentSoftErrors | If true, GeonBit.UI will not raise exceptions on sanity checks, validations, and errors which are not critical. For example, trying to select a value that doesn't exist from a list would do nothing instead of throwing exception.
 | TimeToShowTooltipText | How long to wait before showing tooltip texts.
 | VERSION | Current GeonBit.UI version identifier.
Public field | WhileDragging | Called every frame while entity is being dragged.
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over an entity.
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over an entity, unless mouse button is down.
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over an entity, even if mouse button is down.
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over an entity.
Top
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.Active Field

UserInterfaceActive Field
The currently active user interface instance.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static UserInterface Active

Field Value

Type: UserInterface
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.ActiveEntity Field

UserInterfaceActiveEntity Field
Current active entity, eg last entity user interacted with.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity ActiveEntity

Field Value

Type: Entity
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.AfterDraw Field

UserInterfaceAfterDraw Field
Callback to execute every frame after entity is rendered.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback AfterDraw

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.AfterUpdate Field

UserInterfaceAfterUpdate Field
Callback to execute every frame after entity update.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback AfterUpdate

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.BeforeDraw Field

UserInterfaceBeforeDraw Field
Callback to execute every frame before entity is rendered.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback BeforeDraw

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.BeforeUpdate Field

UserInterfaceBeforeUpdate Field
Callback to execute every frame before entity update.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback BeforeUpdate

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.BlendState Field

UserInterfaceBlendState Field
Blend state to use when rendering UI.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public BlendState BlendState

Field Value

Type: BlendState
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.CursorScale Field

UserInterfaceCursorScale Field
Cursor rendering size.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float CursorScale

Field Value

Type: Single
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.DefaultParagraph Field

UserInterfaceDefaultParagraph Field
Create a default paragraph instance. GeonBit.UI entities use this method when need to create a paragraph, so you can override this to change which paragraph type the built-in entities will use by-default (for example Buttons text, SelectList items, etc.).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static DefaultParagraphGenerator DefaultParagraph

Field Value

Type: DefaultParagraphGenerator
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.DrawUtils Field

UserInterfaceDrawUtils Field
Draw utils helper. Contain general drawing functionality and handle effects replacement.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public DrawUtils DrawUtils

Field Value

Type: DrawUtils
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.GenerateTooltipFunc Field

UserInterfaceGenerateTooltipFunc Field
The function used to generate tooltip text on entities.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public GenerateTooltipFunc GenerateTooltipFunc

Field Value

Type: GenerateTooltipFunc
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.IncludeCursorInRenderTarget Field

UserInterfaceIncludeCursorInRenderTarget Field
If using render targets, should the curser be rendered inside of it? If false, cursor will draw outside the render target, when presenting it.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IncludeCursorInRenderTarget

Field Value

Type: Boolean
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnClick Field

UserInterfaceOnClick Field
Callback to execute when user clicks on an entity (eg release mouse over it).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnClick

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnEntitySpawn Field

UserInterfaceOnEntitySpawn Field
Callback to execute every time a new entity is spawned (note: spawn = first time Update() is called on this entity).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnEntitySpawn

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnFocusChange Field

UserInterfaceOnFocusChange Field
Callback to execute every time an entity focus changes.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnFocusChange

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnMouseDown Field

UserInterfaceOnMouseDown Field
Callback to execute when mouse button is pressed over an entity (called once when button is pressed).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseDown

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnMouseEnter Field

UserInterfaceOnMouseEnter Field
Callback to execute when mouse start hovering over an entity (eg enters its region).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseEnter

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnMouseLeave Field

UserInterfaceOnMouseLeave Field
Callback to execute when mouse stop hovering over an entity (eg leaves its region).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseLeave

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnMouseReleased Field

UserInterfaceOnMouseReleased Field
Callback to execute when mouse button is released over an entity (called once when button is released).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseReleased

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnMouseWheelScroll Field

UserInterfaceOnMouseWheelScroll Field
Callback to execute when mouse wheel scrolls and an entity is the active entity.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseWheelScroll

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnRightClick Field

UserInterfaceOnRightClick Field
Callback to execute when user clicks on an entity with right mouse button (eg release mouse over it).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnRightClick

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnRightMouseDown Field

UserInterfaceOnRightMouseDown Field
Callback to execute when right mouse button is pressed over an entity (called once when button is pressed).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnRightMouseDown

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnStartDrag Field

UserInterfaceOnStartDrag Field
Called when entity starts getting dragged (only if draggable).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnStartDrag

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnStopDrag Field

UserInterfaceOnStopDrag Field
Called when entity stop getting dragged (only if draggable).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnStopDrag

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnValueChange Field

UserInterfaceOnValueChange Field
Callback to execute when any entity value changes (relevant only for entities with value).

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnValueChange

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.OnVisiblityChange Field

UserInterfaceOnVisiblityChange Field
Callback to execute every time the visibility property of an entity change.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnVisiblityChange

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.RenderTargetTransformMatrix Field

UserInterfaceRenderTargetTransformMatrix Field
Optional transformation matrix to apply when drawing with render targets.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Nullable<Matrix> RenderTargetTransformMatrix

Field Value

Type: Nullable Matrix
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.SamplerState Field

UserInterfaceSamplerState Field
Sampler state to use when rendering UI.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SamplerState SamplerState

Field Value

Type: SamplerState
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.ScreenHeight Field

UserInterfaceScreenHeight Field
Screen height.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ScreenHeight

Field Value

Type: Int32
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.ScreenWidth Field

UserInterfaceScreenWidth Field
Screen width.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ScreenWidth

Field Value

Type: Int32
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.ShowCursor Field

UserInterfaceShowCursor Field
Weather or not to draw the cursor.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ShowCursor

Field Value

Type: Boolean
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.SilentSoftErrors Field

UserInterfaceSilentSoftErrors Field
If true, GeonBit.UI will not raise exceptions on sanity checks, validations, and errors which are not critical. For example, trying to select a value that doesn't exist from a list would do nothing instead of throwing exception.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool SilentSoftErrors

Field Value

Type: Boolean
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.TimeToShowTooltipText Field

UserInterfaceTimeToShowTooltipText Field
How long to wait before showing tooltip texts.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float TimeToShowTooltipText

Field Value

Type: Single
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.VERSION Field

UserInterfaceVERSION Field
Current GeonBit.UI version identifier.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public const string VERSION = "3.1.0.4"

Field Value

Type: String
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.WhileDragging Field

UserInterfaceWhileDragging Field
Called every frame while entity is being dragged.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileDragging

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.WhileMouseDown Field

UserInterfaceWhileMouseDown Field
Callback to execute every frame while mouse button is pressed over an entity.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseDown

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.WhileMouseHover Field

UserInterfaceWhileMouseHover Field
Callback to execute every frame while mouse is hovering over an entity, unless mouse button is down.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseHover

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.WhileMouseHoverOrDown Field

UserInterfaceWhileMouseHoverOrDown Field
Callback to execute every frame while mouse is hovering over an entity, even if mouse button is down.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseHoverOrDown

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


UserInterface.WhileRightMouseDown Field

UserInterfaceWhileRightMouseDown Field
Callback to execute every frame while right mouse button is pressed over an entity.

Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileRightMouseDown

Field Value

Type: EventCallback
See Also

Reference

UserInterface Class
GeonBit.UI Namespace


GeonBit.UI.Entities Namespace

GeonBit.UI.Entities Namespace
GeonBit.UI.Entities contains all the UI elements you can create and use in your layouts.
Classes
 | Class | Description
Public class | Button | A clickable button with label on it.
Public class | CheckBox | A checkbox entity, eg a label with a square you can mark as checked or uncheck. Holds a boolean value.
Public class | ColoredRectangle | A colored rectangle with outline.
Public class | ColorInstruction | Hold color instructions for MultiColor paragraphs.
Public class | DropDown | DropDown is just like a list, but it only shows the currently selected value unless clicked on (the list is only revealed while interacted with).
Public class | Entity | Basic UI entity. All entities inherit from this class and share this API.
Public class | Header | Header entity is a subclass of Paragraph. Basically its the same, but with a different default styling, and serves as a sugarcoat to quickly create headers for menues.
Public class | HorizontalLine | An horizontal line, used to separate between different sections of a panel or to emphasize headers.
Public class | Icon | A simple UI icon. Comes we a selection of pre-defined icons to use + optional inventory-like background.
Public class | Image | A renderable image (draw custom texture on UI entities).
Public class | Label | Label entity is a subclass of Paragraph. Basically its the same, but with a different default styling, and serves as a sugarcoat to quickly create labels for widgets.
Public class | LineSpace | A line space is just a spacer for Auto-Anchored entities, eg a method to create artificial distance between rows.
Public class | MulticolorParagraph | Multicolor Paragraph is a paragraph that supports in-text color tags that changes the fill color of the text.
Public class | Panel | A graphical panel or form you can create and add entities to. Used to group together entities with common logic.
Public class | PanelTabs | A graphical panel or form you can create and add entities to. Used to group together entities with common logic.
Public class | PanelTabsTabData | Contains the button and panel of a single tab in the PanelTabs.
Public class | Paragraph | Paragraph is a renderable text. It can be multiline, wrap words, have outline, etc.
Public class | ProgressBar | A sub-class of the slider entity, with graphics more fitting for a progress bar or things like hp bar etc. Behaves the same as a slider, if you want it to be for display only (and not changeable by user), simple set Locked = true.
Public class | RadioButton | A Radio Button entity is like a checkbox (label with a box next to it that can be checked / unchecked) with the exception that whenever a radio button is checked, all its siblings are unchecked automatically.
Public class | RootPanel | A special panel used as the root panel that covers the entire screen. This panel is used internally to serve as the constant root entity in the entities tree.
Public class | SelectList | List of items (strings) user can scroll and pick from.
Public class | Slider | Slider entity looks like a horizontal scrollbar that the user can drag left and right to select a numeric value from range.
Public class | StyleSheet | Set of style properties for different entity states. For example, stylesheet can define that when mouse hover over a paragraph, its text turns red.
Public class | TextInput | A textbox that allow users to put in free text.
Public class | VerticalScrollbar | Used internally as a scrollbar for lists, text boxes, etc..
Enumerations
 | Enumeration | Description
Public enumeration | Anchor | An Anchor is a pre-defined position in parent entity that we use to position a child. For eample, we can use anchors to position an entity at the bottom-center point of its parent. Note: anchor affect both the position relative to parent and also the offset origin point of the entity.
Public enumeration | ButtonSkin | Button skins.
Public enumeration | DrawPhase | Different draw phases of the entity.
Public enumeration | EntityState | Possible entity states and interactions with user.
Public enumeration | FontStyle | Font styles.
Public enumeration | IconType | Pre-defined icons you can use.
Public enumeration | ImageDrawMode | Image drawing modes, eg how to draw the image and fill the destination rectangle with its texture.
Public enumeration | PanelOverflowBehavior | How to treat entities that overflow panel boundaries.
Public enumeration | PanelSkin | Different panel textures you can use.
Public enumeration | SliderSkin | Different sliders skins (textures).


Anchor Enumeration

Anchor Enumeration
An Anchor is a pre-defined position in parent entity that we use to position a child. For eample, we can use anchors to position an entity at the bottom-center point of its parent. Note: anchor affect both the position relative to parent and also the offset origin point of the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum Anchor
Members
Member name | Value | Description
Center | 0 | Center of parent element.
TopLeft | 1 | Top-Left corner of parent element.
TopRight | 2 | Top-Right corner of parent element.
TopCenter | 3 | Top-Center of parent element.
BottomLeft | 4 | Bottom-Left corner of parent element.
BottomRight | 5 | Bottom-Right corner of parent element.
BottomCenter | 6 | Bottom-Center of parent element.
CenterLeft | 7 | Center-Left of parent element.
CenterRight | 8 | Center-Right of parent element.
Auto | 9 | Position of the older sibling bottom, eg align this entity based on its older sibling. Use this property to place entities one after another.
AutoInline | 10 | Position of the older sibling right side, or below it if not enough room in parent. In other words, this will try to put together entities on the same row until overflow parent width, in which case will go row down. Use this property to place entities one after another in the same row.
AutoCenter | 11 | Position of the older sibling bottom, eg align this entity based on its older sibling, but center on X axis. Use this property to place entities one after another but keep them aligned to center (especially paragraphs).
See Also

Reference

GeonBit.UI.Entities Namespace


Button Class

Button Class
A clickable button with label on it.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesButton

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Button : Entity

The Button type exposes the following members.

Constructors
 | Name | Description
Public method | Button | Create the button.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | When button is in Toggle mode, this is the current value (it button checked or not).
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current button skin.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the button a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetCustomSkin | Override the default theme textures and set a custom skin for this specific button.
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ButtonParagraph | Button label. Use this if you want to change the button text or font style.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for buttons label. Note: loaded from UI theme xml file.
 | DefaultSize | Default button size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the button itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToggleMode | If true, button will behave as a checkbox, meaning when you click on it it will stay pressed and have 'checked' value of true.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Button Constructor

Button Constructor
Create the button.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Button(
    string text,
    ButtonSkin skin = ButtonSkin.Default,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Text for the button label.
skin (Optional)
Type: GeonBit.UI.EntitiesButtonSkin
Button skin (texture to use).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
Button size (if not defined will use default size).
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Button Class


Button Properties

Button Properties

The Button type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | When button is in Toggle mode, this is the current value (it button checked or not).
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current button skin.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

Button Class


Button.Checked Property

ButtonChecked Property
When button is in Toggle mode, this is the current value (it button checked or not).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Checked { get; set; }

Property Value

Type: Boolean
See Also

Reference

Button Class


Button.Skin Property

ButtonSkin Property
Set / get current button skin.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ButtonSkin Skin { get; set; }

Property Value

Type: ButtonSkin
See Also

Reference

Button Class


Button Methods

Button Methods

The Button type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the button a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetCustomSkin | Override the default theme textures and set a custom skin for this specific button.
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

Button Class


Button.IsNaturallyInteractable Method

ButtonIsNaturallyInteractable Method
Is the button a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

Button Class


Button.SetCustomSkin Method

ButtonSetCustomSkin Method
Override the default theme textures and set a custom skin for this specific button.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetCustomSkin(
    Texture2D defaultTexture,
    Texture2D mouseHoverTexture,
    Texture2D mouseDownTexture,
    Nullable<Vector2> frameWidth = null
)

Parameters

defaultTexture
Type: Texture2D
Texture to use for default state.
mouseHoverTexture
Type: Texture2D
Texture to use when mouse hover over the button.
mouseDownTexture
Type: Texture2D
Texture to use when mouse button is down over this button.
frameWidth (Optional)
Type: SystemNullable Vector2
The width of the custom texture's frame, in percents of texture size.
Remarks
You must provide all state textures when overriding button skin.
See Also

Reference

Button Class


Button Fields

Button Fields

The Button type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ButtonParagraph | Button label. Use this if you want to change the button text or font style.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for buttons label. Note: loaded from UI theme xml file.
 | DefaultSize | Default button size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the button itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToggleMode | If true, button will behave as a checkbox, meaning when you click on it it will stay pressed and have 'checked' value of true.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Button Class


Button.ButtonParagraph Field

ButtonButtonParagraph Field
Button label. Use this if you want to change the button text or font style.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph ButtonParagraph

Field Value

Type: Paragraph
See Also

Reference

Button Class


Button.DefaultParagraphStyle Field

ButtonDefaultParagraphStyle Field
Default styling for buttons label. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

Button Class


Button.DefaultSize Field

ButtonDefaultSize Field
Default button size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

Button Class


Button.DefaultStyle Field

ButtonDefaultStyle Field
Default styling for the button itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Button Class


Button.ToggleMode Field

ButtonToggleMode Field
If true, button will behave as a checkbox, meaning when you click on it it will stay pressed and have 'checked' value of true.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ToggleMode

Field Value

Type: Boolean
See Also

Reference

Button Class


ButtonSkin Enumeration

ButtonSkin Enumeration
Button skins.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum ButtonSkin
Members
Member name | Value | Description
Default | 0 | The default button skin.
Alternative | 1 | Alternative button skin.
Fancy | 2 | Fancy button skin.
See Also

Reference


CheckBox Class

CheckBox Class
A checkbox entity, eg a label with a square you can mark as checked or uncheck. Holds a boolean value.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesCheckBox
GeonBit.UI.EntitiesRadioButton

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class CheckBox : Entity

The CheckBox type exposes the following members.

Constructors
 | Name | Description
Public method | CheckBox | Create a new checkbox entity.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | CheckBox current value, eg if its checked or unchecked.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the checkbox a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for checkbox label. Note: loaded from UI theme xml file.
 | DefaultSize | Default checkbox size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the checkbox itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | CheckBox label. Use this if you want to change the checkbox text or font style.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


CheckBox Constructor

CheckBox Constructor
Create a new checkbox entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public CheckBox(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null,
    bool isChecked = false
)

Parameters

text
Type: SystemString
CheckBox label text.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
CheckBox size.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
isChecked (Optional)
Type: SystemBoolean
If true, this checkbox will be created as 'checked'.
See Also

Reference

CheckBox Class


CheckBox Properties

CheckBox Properties

The CheckBox type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | CheckBox current value, eg if its checked or unchecked.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

CheckBox Class


CheckBox.Checked Property

CheckBoxChecked Property
CheckBox current value, eg if its checked or unchecked.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Checked { get; set; }

Property Value

Type: Boolean
See Also

Reference

CheckBox Class


CheckBox Methods

CheckBox Methods

The CheckBox type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the checkbox a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

CheckBox Class


CheckBox.IsNaturallyInteractable Method

CheckBoxIsNaturallyInteractable Method
Is the checkbox a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

CheckBox Class


CheckBox Fields

CheckBox Fields

The CheckBox type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for checkbox label. Note: loaded from UI theme xml file.
 | DefaultSize | Default checkbox size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the checkbox itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | CheckBox label. Use this if you want to change the checkbox text or font style.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

CheckBox Class


CheckBox.DefaultParagraphStyle Field

CheckBoxDefaultParagraphStyle Field
Default styling for checkbox label. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

CheckBox Class


CheckBox.DefaultSize Field

CheckBoxDefaultSize Field
Default checkbox size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

CheckBox Class


CheckBox.DefaultStyle Field

CheckBoxDefaultStyle Field
Default styling for the checkbox itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

CheckBox Class


CheckBox.TextParagraph Field

CheckBoxTextParagraph Field
CheckBox label. Use this if you want to change the checkbox text or font style.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph TextParagraph

Field Value

Type: Paragraph
See Also

Reference

CheckBox Class


ColoredRectangle Class

ColoredRectangle Class
A colored rectangle with outline.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesColoredRectangle

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ColoredRectangle : Entity

The ColoredRectangle type exposes the following members.

Constructors
 | Name | Description
Public method | ColoredRectangle(Vector2, Anchor, NullableVector2) | Create the rectangle with default styling.
Public method | ColoredRectangle(Color, Vector2, Anchor, NullableVector2) | Create the rectangle with just fill color.
Public method | ColoredRectangle(Color, Color, Vector2, Anchor, NullableVector2) | Create the rectangle with outline and fill colors.
Public method | ColoredRectangle(Color, Color, Int32, Vector2, Anchor, NullableVector2) | Create the rectangle with outline and fill color + outline width.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default rectangle styling. Override this dictionary to change the way default rectangles appear.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


ColoredRectangle Constructor

ColoredRectangle Constructor
Overload List
 | Name | Description
Public method | ColoredRectangle(Vector2, Anchor, NullableVector2) | Create the rectangle with default styling.
Public method | ColoredRectangle(Color, Vector2, Anchor, NullableVector2) | Create the rectangle with just fill color.
Public method | ColoredRectangle(Color, Color, Vector2, Anchor, NullableVector2) | Create the rectangle with outline and fill colors.
Public method | ColoredRectangle(Color, Color, Int32, Vector2, Anchor, NullableVector2) | Create the rectangle with outline and fill color + outline width.
Top
See Also

Reference

ColoredRectangle Class


ColoredRectangle Constructor (Vector2, Anchor, Nullable(Vector2))

ColoredRectangle Constructor (Vector2, Anchor, NullableVector2)
Create the rectangle with default styling.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ColoredRectangle(
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

size
Type: Vector2
Rectangle size in pixels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from position anchor.
See Also

Reference

ColoredRectangle Class
ColoredRectangle Overload


ColoredRectangle Constructor (Color, Vector2, Anchor, Nullable(Vector2))

ColoredRectangle Constructor (Color, Vector2, Anchor, NullableVector2)
Create the rectangle with just fill color.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ColoredRectangle(
    Color fillColor,
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

fillColor
Type: Color
Rectangle fill color.
size
Type: Vector2
Rectangle size in pixels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from position anchor.
See Also

Reference

ColoredRectangle Class
ColoredRectangle Overload


ColoredRectangle Constructor (Color, Color, Vector2, Anchor, Nullable(Vector2))

ColoredRectangle Constructor (Color, Color, Vector2, Anchor, NullableVector2)
Create the rectangle with outline and fill colors.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ColoredRectangle(
    Color fillColor,
    Color outlineColor,
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

fillColor
Type: Color
Rectangle fill color.
outlineColor
Type: Color
Rectangle outline color.
size
Type: Vector2
Rectangle size in pixels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from position anchor.
See Also

Reference

ColoredRectangle Class
ColoredRectangle Overload


ColoredRectangle Constructor (Color, Color, Int32, Vector2, Anchor, Nullable(Vector2))

ColoredRectangle Constructor (Color, Color, Int32, Vector2, Anchor, NullableVector2)
Create the rectangle with outline and fill color + outline width.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ColoredRectangle(
    Color fillColor,
    Color outlineColor,
    int outlineWidth,
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

fillColor
Type: Color
Rectangle fill color.
outlineColor
Type: Color
Rectangle outline color.
outlineWidth
Type: SystemInt32
Rectangle outline width (0 for no outline).
size
Type: Vector2
Rectangle size in pixels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from position anchor.
See Also

Reference

ColoredRectangle Class
ColoredRectangle Overload


ColoredRectangle Properties

ColoredRectangle Properties

The ColoredRectangle type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

ColoredRectangle Class


ColoredRectangle Methods

ColoredRectangle Methods

The ColoredRectangle type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

ColoredRectangle Class


ColoredRectangle Fields

ColoredRectangle Fields

The ColoredRectangle type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default rectangle styling. Override this dictionary to change the way default rectangles appear.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

ColoredRectangle Class


ColoredRectangle.DefaultStyle Field

ColoredRectangleDefaultStyle Field
Default rectangle styling. Override this dictionary to change the way default rectangles appear.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

ColoredRectangle Class


ColorInstruction Class

ColorInstruction Class
Hold color instructions for MultiColor paragraphs.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesColorInstruction

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ColorInstruction

The ColorInstruction type exposes the following members.

Constructors
 | Name | Description
Public method | ColorInstruction | Constructor to use when creating a color instruction.
Top
Properties
 | Name | Description
Public property | Color | If UseFillColor is false the color here is used for the instruction.
Public property | UseFillColor | Flag represents whether or not to use the default FillColor for this instruction.
Top
Methods
 | Name | Description
 | AddCustomColor | Add a custom color we can use in the multicolor paragraph. You can also override one of the built-in colors.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | StringToColor | Converts a supported color string to its respective color. Supported colors are as follows: red, blue, green, yellow, brown, black, white, cyan, pink, gray, magenta, orange, purple, silver, gold, teal or default (White)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference


ColorInstruction Constructor

ColorInstruction Constructor
Constructor to use when creating a color instruction.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ColorInstruction(
    string sColor
)

Parameters

sColor
Type: SystemString
The string representation of the color to use for rendering.
See Also

Reference

ColorInstruction Class


ColorInstruction Properties

ColorInstruction Properties

The ColorInstruction type exposes the following members.

Properties
 | Name | Description
Public property | Color | If UseFillColor is false the color here is used for the instruction.
Public property | UseFillColor | Flag represents whether or not to use the default FillColor for this instruction.
Top
See Also

Reference

ColorInstruction Class


ColorInstruction.Color Property

ColorInstructionColor Property
If UseFillColor is false the color here is used for the instruction.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color Color { get; }

Property Value

Type: Color
See Also

Reference

ColorInstruction Class


ColorInstruction.UseFillColor Property

ColorInstructionUseFillColor Property
Flag represents whether or not to use the default FillColor for this instruction.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool UseFillColor { get; }

Property Value

Type: Boolean
See Also

Reference

ColorInstruction Class


ColorInstruction Methods

ColorInstruction Methods

The ColorInstruction type exposes the following members.

Methods
 | Name | Description
 | AddCustomColor | Add a custom color we can use in the multicolor paragraph. You can also override one of the built-in colors.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | StringToColor | Converts a supported color string to its respective color. Supported colors are as follows: red, blue, green, yellow, brown, black, white, cyan, pink, gray, magenta, orange, purple, silver, gold, teal or default (White)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

ColorInstruction Class


ColorInstruction.AddCustomColor Method

ColorInstructionAddCustomColor Method
Add a custom color we can use in the multicolor paragraph. You can also override one of the built-in colors.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void AddCustomColor(
    string key,
    Color color
)

Parameters

key
Type: SystemString
Color key to use this color.
color
Type: Color
Color to set.
See Also

Reference

ColorInstruction Class


ColorInstruction.StringToColor Method

ColorInstructionStringToColor Method
Converts a supported color string to its respective color. Supported colors are as follows: red, blue, green, yellow, brown, black, white, cyan, pink, gray, magenta, orange, purple, silver, gold, teal or default (White)

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color StringToColor(
    string sColor
)

Parameters

sColor
Type: SystemString
The color represented as a string value; any invalid value will default to White.

Return Value

Type: Color
The actual color object or White as the fallback default.
See Also

Reference

ColorInstruction Class


DrawPhase Enumeration

DrawPhase Enumeration
Different draw phases of the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum DrawPhase
Members
Member name | Value | Description
Base | 0 | Drawing the entity itself.
Outline | 1 | Drawing entity outline.
Shadow | 2 | Drawing entity's shadow.
See Also

Reference


DropDown Class

DropDown Class
DropDown is just like a list, but it only shows the currently selected value unless clicked on (the list is only revealed while interacted with).
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesDropDown

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class DropDown : Entity

The DropDown type exposes the following members.

Constructors
 | Name | Description
Public method | DropDown | Create the DropDown list.
Top
Properties
 | Name | Description
Public property | AllowReselectValue | If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.
Public property | ArrowDownImage | Get the image entity of the arrow on the side of the Selected Text Panel.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Count | How many items currently in the list.
Public property | DefaultText | Default text to show when no value is selected from the list.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | Empty | Is the list currently empty.
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | ListVisible | Is the DropDown list currentle opened (visible).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Set entity render and update priority. DropDown entity override this function to give some bonus priority, since when list is opened it needs to override entities under it, which usually have bigger index in container. (Overrides EntityPriority.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ScrollPosition | Current scrollbar position.
Public property | SelectedIndex | Currently selected item index (or -1 if none is selected).
Public property | SelectedTextPanel | Get the selected text panel (what's shown when DropDown is closed).
Public property | SelectedTextPanelParagraph | Get the selected text panel paragraph (the text that's shown when DropDown is closed).
Public property | SelectedValue | Currently selected item value (or null if none is selected).
Public property | SelectList | Get the drop-down list component.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | ClearItems | Remove all items from the list.
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Overrides EntityIsInsideEntity(Vector2).)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the list a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Public method | scrollToEnd | Move scrollbar to last item in list.
Public method | ScrollToSelected | Move scrollbar to currently selected item.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Unselect | Clear current selection.
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
 | ArrowSize | Size of the arrow to show on the side of the Selected Text Panel.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | AutoSetListHeight | If true, will auto-set the internal list height based on number of options.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for dropdown labels. Note: loaded from UI theme xml file.
 | DefaultSelectedParagraphStyle | Default styling for the dropdown currently-selected label. Note: loaded from UI theme xml file.
 | DefaultSize | Default select list size in pixels.
 | DefaultStyle | Default style for the dropdown itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnListChange | Special callback to execute when list size changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
 | SelectedPanelHeight | Default height, in pixels, of the selected text panel.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


DropDown Constructor

DropDown Constructor
Create the DropDown list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public DropDown(
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null,
    PanelSkin skin = PanelSkin.ListBackground,
    Nullable<PanelSkin> listSkin = null,
    bool showArrow = true
)

Parameters

size
Type: Vector2
List size (refers to the whole size of the list + the header when dropdown list is opened).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
skin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
Panel skin to use for this DropDown list and header.
listSkin (Optional)
Type: SystemNullable PanelSkin
An optional skin to use for the dropdown list only (if you want a different skin for the list).
showArrow (Optional)
Type: SystemBoolean
If true, will show an up/down arrow next to the dropdown text.
See Also

Reference

DropDown Class


DropDown Properties

DropDown Properties

The DropDown type exposes the following members.

Properties
 | Name | Description
Public property | AllowReselectValue | If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.
Public property | ArrowDownImage | Get the image entity of the arrow on the side of the Selected Text Panel.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Count | How many items currently in the list.
Public property | DefaultText | Default text to show when no value is selected from the list.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | Empty | Is the list currently empty.
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | ListVisible | Is the DropDown list currentle opened (visible).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Set entity render and update priority. DropDown entity override this function to give some bonus priority, since when list is opened it needs to override entities under it, which usually have bigger index in container. (Overrides EntityPriority.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ScrollPosition | Current scrollbar position.
Public property | SelectedIndex | Currently selected item index (or -1 if none is selected).
Public property | SelectedTextPanel | Get the selected text panel (what's shown when DropDown is closed).
Public property | SelectedTextPanelParagraph | Get the selected text panel paragraph (the text that's shown when DropDown is closed).
Public property | SelectedValue | Currently selected item value (or null if none is selected).
Public property | SelectList | Get the drop-down list component.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

DropDown Class


DropDown.AllowReselectValue Property

DropDownAllowReselectValue Property
If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AllowReselectValue { get; set; }

Property Value

Type: Boolean
See Also

Reference

DropDown Class


DropDown.ArrowDownImage Property

DropDownArrowDownImage Property
Get the image entity of the arrow on the side of the Selected Text Panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Image ArrowDownImage { get; }

Property Value

Type: Image
See Also

Reference

DropDown Class


DropDown.Count Property

DropDownCount Property
How many items currently in the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32
See Also

Reference

DropDown Class


DropDown.DefaultText Property

DropDownDefaultText Property
Default text to show when no value is selected from the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string DefaultText { get; set; }

Property Value

Type: String
See Also

Reference

DropDown Class


DropDown.Empty Property

DropDownEmpty Property
Is the list currently empty.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Empty { get; }

Property Value

Type: Boolean
See Also

Reference

DropDown Class


DropDown.ListVisible Property

DropDownListVisible Property
Is the DropDown list currentle opened (visible).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ListVisible { get; set; }

Property Value

Type: Boolean
See Also

Reference

DropDown Class


DropDown.Priority Property

DropDownPriority Property
Set entity render and update priority. DropDown entity override this function to give some bonus priority, since when list is opened it needs to override entities under it, which usually have bigger index in container.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override int Priority { get; }

Property Value

Type: Int32
See Also

Reference

DropDown Class


DropDown.ScrollPosition Property

DropDownScrollPosition Property
Current scrollbar position.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ScrollPosition { get; set; }

Property Value

Type: Int32
See Also

Reference

DropDown Class


DropDown.SelectedIndex Property

DropDownSelectedIndex Property
Currently selected item index (or -1 if none is selected).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int SelectedIndex { get; set; }

Property Value

Type: Int32
See Also

Reference

DropDown Class


DropDown.SelectedTextPanel Property

DropDownSelectedTextPanel Property
Get the selected text panel (what's shown when DropDown is closed).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Panel SelectedTextPanel { get; }

Property Value

Type: Panel
See Also

Reference

DropDown Class


DropDown.SelectedTextPanelParagraph Property

DropDownSelectedTextPanelParagraph Property
Get the selected text panel paragraph (the text that's shown when DropDown is closed).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph SelectedTextPanelParagraph { get; }

Property Value

Type: Paragraph
See Also

Reference

DropDown Class


DropDown.SelectedValue Property

DropDownSelectedValue Property
Currently selected item value (or null if none is selected).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string SelectedValue { get; set; }

Property Value

Type: String
See Also

Reference

DropDown Class


DropDown.SelectList Property

DropDownSelectList Property
Get the drop-down list component.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SelectList SelectList { get; }

Property Value

Type: SelectList
See Also

Reference

DropDown Class


DropDown Methods

DropDown Methods

The DropDown type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | ClearItems | Remove all items from the list.
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Overrides EntityIsInsideEntity(Vector2).)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the list a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Public method | scrollToEnd | Move scrollbar to last item in list.
Public method | ScrollToSelected | Move scrollbar to currently selected item.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Unselect | Clear current selection.
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

DropDown Class


DropDown.AddItem Method

DropDownAddItem Method
Overload List
 | Name | Description
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Top
See Also

Reference

DropDown Class


DropDown.AddItem Method (String)

DropDownAddItem Method (String)
Add value to list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddItem(
    string value
)

Parameters

value
Type: SystemString
Value to add.
Remarks
Values can be duplicated, however, this will cause annoying behavior when trying to delete or select by value (will always pick the first found).
See Also

Reference

DropDown Class
AddItem Overload


DropDown.AddItem Method (String, Int32)

DropDownAddItem Method (String, Int32)
Add value to list at a specific index.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddItem(
    string value,
    int index
)

Parameters

value
Type: SystemString
Value to add.
index
Type: SystemInt32
Index to insert the new item into.
Remarks
Values can be duplicated, however, this will cause annoying behavior when trying to delete or select by value (will always pick the first found).
See Also

Reference

DropDown Class
AddItem Overload


DropDown.ClearItems Method

DropDownClearItems Method
Remove all items from the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ClearItems()
See Also

Reference

DropDown Class


DropDown.IsInsideEntity Method

DropDownIsInsideEntity Method
Test if a given point is inside entity's boundaries.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsInsideEntity(
    Vector2 point
)

Parameters

point
Type: Vector2
Point to test.

Return Value

Type: Boolean
True if point is in entity's boundaries (destination rectangle)
Remarks
This function result is affected by the 'UseActualSizeForCollision' flag.
See Also

Reference

DropDown Class


DropDown.IsNaturallyInteractable Method

DropDownIsNaturallyInteractable Method
Is the list a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

DropDown Class


DropDown.RemoveItem Method

DropDownRemoveItem Method
Overload List
 | Name | Description
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Top
See Also

Reference

DropDown Class


DropDown.RemoveItem Method (Int32)

DropDownRemoveItem Method (Int32)
Remove item from the list, by index.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveItem(
    int index
)

Parameters

index
Type: SystemInt32
Index of the item to remove.
See Also

Reference

DropDown Class
RemoveItem Overload


DropDown.RemoveItem Method (String)

DropDownRemoveItem Method (String)
Remove value from the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveItem(
    string value
)

Parameters

value
Type: SystemString
Value to remove.
See Also

Reference

DropDown Class
RemoveItem Overload


DropDown.scrollToEnd Method

DropDownscrollToEnd Method
Move scrollbar to last item in list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void scrollToEnd()
See Also

Reference

DropDown Class


DropDown.ScrollToSelected Method

DropDownScrollToSelected Method
Move scrollbar to currently selected item.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ScrollToSelected()
See Also

Reference

DropDown Class


DropDown.Unselect Method

DropDownUnselect Method
Clear current selection.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Unselect()
See Also

Reference

DropDown Class


DropDown Fields

DropDown Fields

The DropDown type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
 | ArrowSize | Size of the arrow to show on the side of the Selected Text Panel.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | AutoSetListHeight | If true, will auto-set the internal list height based on number of options.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for dropdown labels. Note: loaded from UI theme xml file.
 | DefaultSelectedParagraphStyle | Default styling for the dropdown currently-selected label. Note: loaded from UI theme xml file.
 | DefaultSize | Default select list size in pixels.
 | DefaultStyle | Default style for the dropdown itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnListChange | Special callback to execute when list size changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
 | SelectedPanelHeight | Default height, in pixels, of the selected text panel.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

DropDown Class


DropDown.ArrowSize Field

DropDownArrowSize Field
Size of the arrow to show on the side of the Selected Text Panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static int ArrowSize

Field Value

Type: Int32
See Also

Reference

DropDown Class


DropDown.AutoSetListHeight Field

DropDownAutoSetListHeight Field
If true, will auto-set the internal list height based on number of options.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AutoSetListHeight

Field Value

Type: Boolean
See Also

Reference

DropDown Class


DropDown.DefaultParagraphStyle Field

DropDownDefaultParagraphStyle Field
Default styling for dropdown labels. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

DropDown Class


DropDown.DefaultSelectedParagraphStyle Field

DropDownDefaultSelectedParagraphStyle Field
Default styling for the dropdown currently-selected label. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultSelectedParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

DropDown Class


DropDown.DefaultSize Field

DropDownDefaultSize Field
Default select list size in pixels.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

DropDown Class


DropDown.DefaultStyle Field

DropDownDefaultStyle Field
Default style for the dropdown itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

DropDown Class


DropDown.OnListChange Field

DropDownOnListChange Field
Special callback to execute when list size changes.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnListChange

Field Value

Type: EventCallback
See Also

Reference

DropDown Class


DropDown.SelectedPanelHeight Field

DropDownSelectedPanelHeight Field
Default height, in pixels, of the selected text panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static int SelectedPanelHeight

Field Value

Type: Int32
See Also

Reference

DropDown Class


Entity Class

Entity Class
Basic UI entity. All entities inherit from this class and share this API.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
More...

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Entity

The Entity type exposes the following members.

Constructors
 | Name | Description
Public method | Entity | Create the entity.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around).
Public property | EntityDefaultSize | Return the default size for this entity.
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property.
Public property | InternalDestRect | Get internal destination rect.
Public property | IsDirty | Get if this entity needs to recalculate destination rect.
Public property | IsFocused | Does this entity or one of its children currently focused?
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down).
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width.
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width.
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property.
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property.
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property.
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property.
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property.
Public property | Parent | Get the direct parent of this entity.
Public property | Priority | Return entity priority in drawing order and event handling.
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property.
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property.
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property.
Public property | Size | Entity current size property.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors.
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors.
Public property | State | Current entity state (default / mouse hover / mouse down..).
Public property | Visible | Set / get visibility.
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity.
Public method | BringToFront | Bring this entity to be on front (inside its parent).
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on.
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first).
Public method | ClearChildren | Remove all children entities.
Public method | Draw | Draw this entity and its children.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | Find(String, Boolean) | Find and return first occurance of a child entity with a given identifier.
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type.
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state).
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap.
Public method | GetChildren | Return all children of this entity.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner.
Public method | GetStyleProperty | Return stylesheet property for a given state.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root.
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries.
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc.
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible.
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity.
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things.
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | RemoveChild | Remove child entity.
Public method | RemoveFromParent | Remove this entity from its parent.
Public method | SetAnchor | Set the anchor of this entity.
Public method | SetOffset | Set the offset of this entity.
Public method | SetPosition | Set the position and anchor of this entity.
Public method | SetStyleProperty | Set a stylesheet property.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events.
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent.
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update).
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet.
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered.
Public field | AfterUpdate | Callback to execute every frame after this entity updates.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events).
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered.
Public field | BeforeUpdate | Callback to execute every frame before this entity updates.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children.
 | DefaultSize | Default size this entity will have when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Basic default style that all entities share. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events.
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries.
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled).
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it).
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed).
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region).
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region).
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released).
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity.
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it).
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed).
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable).
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable).
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value).
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again).
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough.
 | USE_DEFAULT_SIZE | A special size used value to use when you want to get the entity default size.
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor.
Public field | WhileDragging | Called every frame while the entity is being dragged.
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity.
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down).
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down.
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity.
Top
See Also

Reference

GeonBit.UI.Entities Namespace
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesButton
GeonBit.UI.EntitiesCheckBox
GeonBit.UI.EntitiesColoredRectangle
GeonBit.UI.EntitiesDropDown
GeonBit.UI.EntitiesHorizontalLine
GeonBit.UI.EntitiesImage
GeonBit.UI.EntitiesLineSpace
GeonBit.UI.EntitiesPanel
GeonBit.UI.EntitiesPanelTabs
GeonBit.UI.EntitiesParagraph
GeonBit.UI.EntitiesSlider


Entity Constructor

Entity Constructor
Create the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity(
    Nullable<Vector2> size = null,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

size (Optional)
Type: SystemNullable Vector2
Entity size, in pixels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Poisition anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Entity Class


Entity Properties

Entity Properties

The Entity type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around).
Public property | EntityDefaultSize | Return the default size for this entity.
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property.
Public property | InternalDestRect | Get internal destination rect.
Public property | IsDirty | Get if this entity needs to recalculate destination rect.
Public property | IsFocused | Does this entity or one of its children currently focused?
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down).
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width.
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width.
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property.
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property.
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property.
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property.
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property.
Public property | Parent | Get the direct parent of this entity.
Public property | Priority | Return entity priority in drawing order and event handling.
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property.
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property.
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property.
Public property | Size | Entity current size property.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors.
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors.
Public property | State | Current entity state (default / mouse hover / mouse down..).
Public property | Visible | Set / get visibility.
Top
See Also

Reference

Entity Class


Entity.Background Property

EntityBackground Property
Optional background entity that will not respond to events and will always be rendered right behind this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity Background { get; set; }

Property Value

Type: Entity
See Also

Reference

Entity Class


Entity.Draggable Property

EntityDraggable Property
Is the entity draggable (eg can a user grab it and drag it around).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Draggable { get; set; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity.EntityDefaultSize Property

EntityEntityDefaultSize Property
Return the default size for this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 EntityDefaultSize { get; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.FillColor Property

EntityFillColor Property
Entity fill color - this is just a sugarcoat to access the default fill color style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color FillColor { get; set; }

Property Value

Type: Color
See Also

Reference

Entity Class


Entity.InternalDestRect Property

EntityInternalDestRect Property
Get internal destination rect.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Rectangle InternalDestRect { get; }

Property Value

Type: Rectangle
See Also

Reference

Entity Class


Entity.IsDirty Property

EntityIsDirty Property
Get if this entity needs to recalculate destination rect.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsDirty { get; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity.IsFocused Property

EntityIsFocused Property
Does this entity or one of its children currently focused?

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsFocused { get; set; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity.IsMouseDown Property

EntityIsMouseDown Property
Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsMouseDown { get; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity.IsMouseOver Property

EntityIsMouseOver Property
Return if the mouse is currently over this entity (regardless of weather or not mouse button is down).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsMouseOver { get; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity.MaxSize Property

EntityMaxSize Property
If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Nullable<Vector2> MaxSize { get; set; }

Property Value

Type: Nullable Vector2
See Also

Reference

Entity Class


Entity.MinSize Property

EntityMinSize Property
If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Nullable<Vector2> MinSize { get; set; }

Property Value

Type: Nullable Vector2
See Also

Reference

Entity Class


Entity.Opacity Property

EntityOpacity Property
Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte Opacity { get; set; }

Property Value

Type: Byte
See Also

Reference

Entity Class


Entity.OutlineColor Property

EntityOutlineColor Property
Entity outline color - this is just a sugarcoat to access the default outline color style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color OutlineColor { get; set; }

Property Value

Type: Color
See Also

Reference

Entity Class


Entity.OutlineOpacity Property

EntityOutlineOpacity Property
Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte OutlineOpacity { get; set; }

Property Value

Type: Byte
See Also

Reference

Entity Class


Entity.OutlineWidth Property

EntityOutlineWidth Property
Entity outline width - this is just a sugarcoat to access the default outline color style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int OutlineWidth { get; set; }

Property Value

Type: Int32
See Also

Reference

Entity Class


Entity.Padding Property

EntityPadding Property
Entity padding - this is just a sugarcoat to access the default padding style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 Padding { get; set; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.Parent Property

EntityParent Property
Get the direct parent of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity Parent { get; }

Property Value

Type: Entity
See Also

Reference

Entity Class


Entity.Priority Property

EntityPriority Property
Return entity priority in drawing order and event handling.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual int Priority { get; }

Property Value

Type: Int32
See Also

Reference

Entity Class


Entity.Scale Property

EntityScale Property
Entity scale - this is just a sugarcoat to access the default scale style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float Scale { get; set; }

Property Value

Type: Single
See Also

Reference

Entity Class


Entity.ShadowColor Property

EntityShadowColor Property
Entity shadow color - this is just a sugarcoat to access the default shadow color style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color ShadowColor { get; set; }

Property Value

Type: Color
See Also

Reference

Entity Class


Entity.ShadowOffset Property

EntityShadowOffset Property
Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 ShadowOffset { get; set; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.ShadowScale Property

EntityShadowScale Property
Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float ShadowScale { get; set; }

Property Value

Type: Single
See Also

Reference

Entity Class


Entity.Size Property

EntitySize Property
Entity current size property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 Size { get; set; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.SpaceAfter Property

EntitySpaceAfter Property
Extra space (in pixels) to reserve *after* this entity when using Auto Anchors.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 SpaceAfter { get; set; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.SpaceBefore Property

EntitySpaceBefore Property
Extra space (in pixels) to reserve *before* this entity when using Auto Anchors.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 SpaceBefore { get; set; }

Property Value

Type: Vector2
See Also

Reference

Entity Class


Entity.State Property

EntityState Property
Current entity state (default / mouse hover / mouse down..).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EntityState State { get; set; }

Property Value

Type: EntityState
See Also

Reference

Entity Class


Entity.Visible Property

EntityVisible Property
Set / get visibility.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Visible { get; set; }

Property Value

Type: Boolean
See Also

Reference

Entity Class


Entity Methods

Entity Methods

The Entity type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity.
Public method | BringToFront | Bring this entity to be on front (inside its parent).
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on.
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first).
Public method | ClearChildren | Remove all children entities.
Public method | Draw | Draw this entity and its children.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | Find(String, Boolean) | Find and return first occurance of a child entity with a given identifier.
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type.
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state).
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap.
Public method | GetChildren | Return all children of this entity.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner.
Public method | GetStyleProperty | Return stylesheet property for a given state.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root.
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries.
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc.
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible.
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity.
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things.
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | RemoveChild | Remove child entity.
Public method | RemoveFromParent | Remove this entity from its parent.
Public method | SetAnchor | Set the anchor of this entity.
Public method | SetOffset | Set the offset of this entity.
Public method | SetPosition | Set the position and anchor of this entity.
Public method | SetStyleProperty | Set a stylesheet property.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events.
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent.
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update).
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet.
Top
See Also

Reference

Entity Class


Entity.AddChild Method

EntityAddChild Method
Add a child entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity AddChild(
    Entity child,
    bool inheritParentState = false,
    int index = -1
)

Parameters

child
Type: GeonBit.UI.EntitiesEntity
Entity to add as child.
inheritParentState (Optional)
Type: SystemBoolean
If true, this entity will inherit the parent's state (set InheritParentState property).
index (Optional)
Type: SystemInt32
If provided, will be the index in the children array to push the new entity.

Return Value

Type: Entity
The newly added entity.
See Also

Reference

Entity Class


Entity.BringToFront Method

EntityBringToFront Method
Bring this entity to be on front (inside its parent).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void BringToFront()
See Also

Reference

Entity Class


Entity.CalcDestRect Method

EntityCalcDestRect Method
Calculate and return the destination rectangle, eg the space this entity is rendered on.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Rectangle CalcDestRect()

Return Value

Type: Rectangle
Destination rectangle.
See Also

Reference

Entity Class


Entity.CalcInternalRect Method

EntityCalcInternalRect Method
Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Rectangle CalcInternalRect()

Return Value

Type: Rectangle
Internal destination rectangle.
See Also

Reference

Entity Class


Entity.ClearChildren Method

EntityClearChildren Method
Remove all children entities.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ClearChildren()
See Also

Reference

Entity Class


Entity.Draw Method

EntityDraw Method
Draw this entity and its children.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void Draw(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to use for drawing.
See Also

Reference

Entity Class


Entity.Find Method

EntityFind Method
Overload List
 | Name | Description
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type.
Public method | Find(String, Boolean) | Find and return first occurance of a child entity with a given identifier.
Top
See Also

Reference

Entity Class


Entity.Find(T) Method (String, Boolean)

EntityFindT Method (String, Boolean)
Find and return first occurance of a child entity with a given identifier and specific type.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public T Find<T>(
    string identifier,
    bool recursive = false
)
where T : Entity

Parameters

identifier
Type: SystemString
Identifier to find.
recursive (Optional)
Type: SystemBoolean
If true, will search recursively in children of children. If false, will search only in direct children.

Type Parameters

T
Entity type to get.

Return Value

Type: T
First found entity with given identifier and type, or null if nothing found.
See Also

Reference

Entity Class
Find Overload


Entity.Find Method (String, Boolean)

EntityFind Method (String, Boolean)
Find and return first occurance of a child entity with a given identifier.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Entity Find(
    string identifier,
    bool recursive = false
)

Parameters

identifier
Type: SystemString
Identifier to find.
recursive (Optional)
Type: SystemBoolean
If true, will search recursively in children of children. If false, will search only in direct children.

Return Value

Type: Entity
First found entity with given identifier, or null if nothing found.
See Also

Reference

Entity Class
Find Overload


Entity.GetActiveStyle Method

EntityGetActiveStyle Method
Return stylesheet property for current entity state (or default if undefined for state).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public StyleProperty GetActiveStyle(
    string property
)

Parameters

property
Type: SystemString
Property identifier.

Return Value

Type: StyleProperty
Stylesheet property value for current entity state, or default if not defined.
See Also

Reference

Entity Class


Entity.GetActualDestRect Method

EntityGetActualDestRect Method
Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual Rectangle GetActualDestRect()

Return Value

Type: Rectangle
The actual destination rectangle.
See Also

Reference

Entity Class


Entity.GetChildren Method

EntityGetChildren Method
Return all children of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public List<Entity> GetChildren()

Return Value

Type: List Entity
List with all children in entity.
See Also

Reference

Entity Class


Entity.GetRelativeOffset Method

EntityGetRelativeOffset Method
Return the relative offset, in pixels, from parent top-left corner.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 GetRelativeOffset()

Return Value

Type: Vector2
Calculated offset from parent top-left corner.
Remarks
This return the offset between the top left corner of this entity regardless of anchor type.
See Also

Reference

Entity Class


Entity.GetStyleProperty Method

EntityGetStyleProperty Method
Return stylesheet property for a given state.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public StyleProperty GetStyleProperty(
    string property,
    EntityState state = EntityState.Default,
    bool fallbackToDefault = true
)

Parameters

property
Type: SystemString
Property identifier.
state (Optional)
Type: GeonBit.UI.EntitiesEntityState
State to get property for (if undefined will fallback to default state).
fallbackToDefault (Optional)
Type: SystemBoolean
If true and property not found for given state, will fallback to default state.

Return Value

Type: StyleProperty
Style property value for given state or default, or null if undefined.
See Also

Reference

Entity Class


Entity.IsDeepChildOf Method

EntityIsDeepChildOf Method
Check if this entity is a descendant of another entity. This goes up all the way to root.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsDeepChildOf(
    Entity other
)

Parameters

other
Type: GeonBit.UI.EntitiesEntity
Entity to check if this entity is descendant of.

Return Value

Type: Boolean
True if this entity is descendant of the other entity.
See Also

Reference

Entity Class


Entity.IsDisabled Method

EntityIsDisabled Method
Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsDisabled()

Return Value

Type: Boolean
True if entity is disabled.
See Also

Reference

Entity Class


Entity.IsInsideEntity Method

EntityIsInsideEntity Method
Test if a given point is inside entity's boundaries.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual bool IsInsideEntity(
    Vector2 point
)

Parameters

point
Type: Vector2
Point to test.

Return Value

Type: Boolean
True if point is in entity's boundaries (destination rectangle)
Remarks
This function result is affected by the 'UseActualSizeForCollision' flag.
See Also

Reference

Entity Class


Entity.IsLocked Method

EntityIsLocked Method
Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsLocked()

Return Value

Type: Boolean
True if entity is disabled.
See Also

Reference

Entity Class


Entity.IsNaturallyInteractable Method

EntityIsNaturallyInteractable Method
Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual bool IsNaturallyInteractable()

Return Value

Type: Boolean
True if entity is naturally interactable.
Remarks
This function should be overrided and implemented by different entities, and either return constant True or False.
See Also

Reference

Entity Class


Entity.IsVisible Method

EntityIsVisible Method
Return if this entity is currently visible, eg this and all its parents and grandparents are visible.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsVisible()

Return Value

Type: Boolean
True if entity is really visible.
See Also

Reference

Entity Class


Entity.IterateChildren Method

EntityIterateChildren Method
Iterate over children and call 'callback' for every direct child of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void IterateChildren(
    EventCallback callback
)

Parameters

callback
Type: GeonBit.UIEventCallback
Callback function to call with every child of this entity.
See Also

Reference

Entity Class


Entity.MarkAsDirty Method

EntityMarkAsDirty Method
Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void MarkAsDirty()
See Also

Reference

Entity Class


Entity.PropagateEventsTo Method

EntityPropagateEventsTo Method
Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void PropagateEventsTo(
    Entity other
)

Parameters

other
Type: GeonBit.UI.EntitiesEntity
Entity to propagate events to.
See Also

Reference

Entity Class


Entity.RemoveChild Method

EntityRemoveChild Method
Remove child entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveChild(
    Entity child
)

Parameters

child
Type: GeonBit.UI.EntitiesEntity
Entity to remove.
See Also

Reference

Entity Class


Entity.RemoveFromParent Method

EntityRemoveFromParent Method
Remove this entity from its parent.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveFromParent()
See Also

Reference

Entity Class


Entity.SetAnchor Method

EntitySetAnchor Method
Set the anchor of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetAnchor(
    Anchor anchor
)

Parameters

anchor
Type: GeonBit.UI.EntitiesAnchor
New anchor to set.
See Also

Reference

Entity Class


Entity.SetOffset Method

EntitySetOffset Method
Set the offset of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetOffset(
    Vector2 offset
)

Parameters

offset
Type: Vector2
New offset to set.
See Also

Reference

Entity Class


Entity.SetPosition Method

EntitySetPosition Method
Set the position and anchor of this entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetPosition(
    Anchor anchor,
    Vector2 offset
)

Parameters

anchor
Type: GeonBit.UI.EntitiesAnchor
New anchor to set.
offset
Type: Vector2
Offset from new anchor position.
See Also

Reference

Entity Class


Entity.SetStyleProperty Method

EntitySetStyleProperty Method
Set a stylesheet property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetStyleProperty(
    string property,
    StyleProperty value,
    EntityState state = EntityState.Default,
    bool markAsDirty = true
)

Parameters

property
Type: SystemString
Property identifier.
value
Type: StyleProperty
Property value.
state (Optional)
Type: GeonBit.UI.EntitiesEntityState
State to set property for.
markAsDirty (Optional)
Type: SystemBoolean
If true, will mark this entity as dirty after this style change.
See Also

Reference

Entity Class


Entity.Update Method

EntityUpdate Method
Called every frame to update entity state and call events.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void Update(
    ref Entity targetEntity,
    ref Entity dragTargetEntity,
    ref bool wasEventHandled,
    Point scrollVal
)

Parameters

targetEntity
Type: GeonBit.UI.EntitiesEntity
The deepest child entity with highest priority that we point on and can be interacted with.
dragTargetEntity
Type: GeonBit.UI.EntitiesEntity
The deepest child dragable entity with highest priority that we point on and can be drag if mouse down.
wasEventHandled
Type: SystemBoolean
Set to true if current event was already handled by a deeper child.
scrollVal
Type: Point
Combined scrolling value (panels with scrollbar etc) of all parents.
See Also

Reference

Entity Class


Entity.UpdateDestinationRects Method

EntityUpdateDestinationRects Method
Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void UpdateDestinationRects()
See Also

Reference

Entity Class


Entity.UpdateDestinationRectsIfDirty Method

EntityUpdateDestinationRectsIfDirty Method
Update dest rect and internal dest rect, but only if needed (eg if something changed since last update).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void UpdateDestinationRectsIfDirty()
See Also

Reference

Entity Class


Entity.UpdateStyle Method

EntityUpdateStyle Method
Update the entire stylesheet from a different stylesheet.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void UpdateStyle(
    StyleSheet updates
)

Parameters

updates
Type: GeonBit.UI.EntitiesStyleSheet
Stylesheet to update from.
See Also

Reference

Entity Class


Entity Fields

Entity Fields

The Entity type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered.
Public field | AfterUpdate | Callback to execute every frame after this entity updates.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events).
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered.
Public field | BeforeUpdate | Callback to execute every frame before this entity updates.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children.
 | DefaultSize | Default size this entity will have when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Basic default style that all entities share. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events.
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries.
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled).
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it).
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed).
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region).
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region).
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released).
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity.
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it).
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed).
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable).
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable).
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value).
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again).
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough.
 | USE_DEFAULT_SIZE | A special size used value to use when you want to get the entity default size.
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor.
Public field | WhileDragging | Called every frame while the entity is being dragged.
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity.
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down).
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down.
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity.
Top
See Also

Reference

Entity Class


Entity.AfterDraw Field

EntityAfterDraw Field
Callback to execute every frame after this entity is rendered.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback AfterDraw

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.AfterUpdate Field

EntityAfterUpdate Field
Callback to execute every frame after this entity updates.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback AfterUpdate

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.AttachedData Field

EntityAttachedData Field
Optional data you can attach to this entity and retrieve later (for example when handling events).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Object AttachedData

Field Value

Type: Object
See Also

Reference

Entity Class


Entity.BeforeDraw Field

EntityBeforeDraw Field
Callback to execute every frame before this entity is rendered.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback BeforeDraw

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.BeforeUpdate Field

EntityBeforeUpdate Field
Callback to execute every frame before this entity updates.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback BeforeUpdate

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.ClickThrough Field

EntityClickThrough Field
If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ClickThrough

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.DefaultSize Field

EntityDefaultSize Field
Default size this entity will have when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

Entity Class


Entity.DefaultStyle Field

EntityDefaultStyle Field
Basic default style that all entities share. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Entity Class


Entity.Disabled Field

EntityDisabled Field
If true, this entity and its children will be drawn in greyscale effect and will not respond to events.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Disabled

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.ExtraMargin Field

EntityExtraMargin Field
Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Point ExtraMargin

Field Value

Type: Point
See Also

Reference

Entity Class


Entity.Identifier Field

EntityIdentifier Field
Optional identifier you can attach to entities so you can later search and retrieve by.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string Identifier

Field Value

Type: String
See Also

Reference

Entity Class


Entity.LimitDraggingToParentBoundaries Field

EntityLimitDraggingToParentBoundaries Field
If true, users will not be able to drag this entity outside its parent boundaries.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool LimitDraggingToParentBoundaries

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.Locked Field

EntityLocked Field
If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Locked

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.OnClick Field

EntityOnClick Field
Callback to execute when user clicks on this entity (eg release mouse over it).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnClick

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnFocusChange Field

EntityOnFocusChange Field
Callback to execute every time this entity focus / unfocus.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnFocusChange

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnMouseDown Field

EntityOnMouseDown Field
Callback to execute when mouse button is pressed over this entity (called once when button is pressed).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseDown

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnMouseEnter Field

EntityOnMouseEnter Field
Callback to execute when mouse start hovering over this entity (eg enters its region).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseEnter

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnMouseLeave Field

EntityOnMouseLeave Field
Callback to execute when mouse stop hovering over this entity (eg leaves its region).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseLeave

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnMouseReleased Field

EntityOnMouseReleased Field
Callback to execute when mouse button is released over this entity (called once when button is released).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseReleased

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnMouseWheelScroll Field

EntityOnMouseWheelScroll Field
Callback to execute when mouse wheel scrolls and this entity is the active entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnMouseWheelScroll

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnRightClick Field

EntityOnRightClick Field
Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnRightClick

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnRightMouseDown Field

EntityOnRightMouseDown Field
Callback to execute when right mouse button is pressed over this entity (called once when button is pressed).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnRightMouseDown

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnStartDrag Field

EntityOnStartDrag Field
Called when entity starts getting dragged (only if draggable).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnStartDrag

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnStopDrag Field

EntityOnStopDrag Field
Called when entity stop getting dragged (only if draggable).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnStopDrag

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnValueChange Field

EntityOnValueChange Field
Callback to execute when entity value changes (relevant only for entities with value).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnValueChange

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.OnVisiblityChange Field

EntityOnVisiblityChange Field
Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnVisiblityChange

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.PromiscuousClicksMode Field

EntityPromiscuousClicksMode Field
If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool PromiscuousClicksMode

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.ToolTipText Field

EntityToolTipText Field
Optional tooltip text to show if the user points on this entity for long enough.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string ToolTipText

Field Value

Type: String
See Also

Reference

Entity Class


Entity.USE_DEFAULT_SIZE Field

EntityUSE_DEFAULT_SIZE Field
A special size used value to use when you want to get the entity default size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static readonly Vector2 USE_DEFAULT_SIZE

Field Value

Type: Vector2
See Also

Reference

Entity Class


Entity.UseActualSizeForCollision Field

EntityUseActualSizeForCollision Field
If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool UseActualSizeForCollision

Field Value

Type: Boolean
See Also

Reference

Entity Class


Entity.WhileDragging Field

EntityWhileDragging Field
Called every frame while the entity is being dragged.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileDragging

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.WhileMouseDown Field

EntityWhileMouseDown Field
Callback to execute every frame while mouse button is pressed over the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseDown

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.WhileMouseHover Field

EntityWhileMouseHover Field
Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseHover

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.WhileMouseHoverOrDown Field

EntityWhileMouseHoverOrDown Field
Callback to execute every frame while mouse is hovering over the entity, even if mouse is down.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileMouseHoverOrDown

Field Value

Type: EventCallback
See Also

Reference

Entity Class


Entity.WhileRightMouseDown Field

EntityWhileRightMouseDown Field
Callback to execute every frame while right mouse button is pressed over the entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback WhileRightMouseDown

Field Value

Type: EventCallback
See Also

Reference

Entity Class


EntityState Enumeration

EntityState Enumeration
Possible entity states and interactions with user.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum EntityState
Members
Member name | Value | Description
Default | 0 | Default state, eg currently not interacting.
MouseHover | 1 | Mouse is hovering over this entity.
MouseDown | 2 | Mouse button is pressed down over this entity.
See Also

Reference


FontStyle Enumeration

FontStyle Enumeration
Font styles.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum FontStyle
Members
Member name | Value | Description
Regular | 0 | Regular font.
Bold | 1 | Bold font.
Italic | 2 | Italic font.
See Also

Reference


Header Class

Header Class
Header entity is a subclass of Paragraph. Basically its the same, but with a different default styling, and serves as a sugarcoat to quickly create headers for menues.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesParagraph
GeonBit.UI.EntitiesHeader

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Header : Paragraph

The Header type exposes the following members.

Constructors
 | Name | Description
Public method | Header | Create the header.
Top
Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Inherited from Paragraph.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for headers. Remember that header is a subclass of Paragraph and has its basic styline. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Header Constructor

Header Constructor
Create the header.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Header(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Header text.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Header Class


Header Properties

Header Properties

The Header type exposes the following members.

Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Inherited from Paragraph.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
See Also

Reference

Header Class


Header Methods

Header Methods

The Header type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
See Also

Reference

Header Class


Header Fields

Header Fields

The Header type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for headers. Remember that header is a subclass of Paragraph and has its basic styline. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Header Class


Header.DefaultStyle Field

HeaderDefaultStyle Field
Default styling for headers. Remember that header is a subclass of Paragraph and has its basic styline. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Header Class


HorizontalLine Class

HorizontalLine Class
An horizontal line, used to separate between different sections of a panel or to emphasize headers.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesHorizontalLine

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class HorizontalLine : Entity

The HorizontalLine type exposes the following members.

Constructors
 | Name | Description
Public method | HorizontalLine | Create the horizontal line.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for the horizontal line. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


HorizontalLine Constructor

HorizontalLine Constructor
Create the horizontal line.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public HorizontalLine(
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

HorizontalLine Class


HorizontalLine Properties

HorizontalLine Properties

The HorizontalLine type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

HorizontalLine Class


HorizontalLine Methods

HorizontalLine Methods

The HorizontalLine type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

HorizontalLine Class


HorizontalLine Fields

HorizontalLine Fields

The HorizontalLine type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for the horizontal line. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

HorizontalLine Class


HorizontalLine.DefaultStyle Field

HorizontalLineDefaultStyle Field
Default styling for the horizontal line. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

HorizontalLine Class


Icon Class

Icon Class
A simple UI icon. Comes we a selection of pre-defined icons to use + optional inventory-like background.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesImage
GeonBit.UI.EntitiesIcon

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Icon : Image

The Icon type exposes the following members.

Constructors
 | Name | Description
Public method | Icon | Create a new icon. Note: if you want to use your own texture for the icon, simply set 'icon' to be IconType.None and replace 'Texture' with your own texture after it is created.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcAutoHeight | Calculate height automatically based on width, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently 100 units, calling this function will update this image height to be 100 / 2 = 50. (Inherited from Image.)
Public method | CalcAutoWidth | Calculate width automatically based on height, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently 100 units, calling this function will update this image width to be 100 x 2 = 200. (Inherited from Image.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetColorAt | Get texture color at a given coordinates. (Inherited from Image.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetTextureCoordsAt | Convert a given position to texture coords of this image. (Inherited from Image.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | SetTextureColorAt | Set texture color at a given coordinates. Note: this will affect all entities using this texture. (Inherited from Image.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
 | BackgroundSize | Icon background size in pixels.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default icon size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for icons. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | DrawBackground | If true, will draw inventory-like background to this icon.
Public field | DrawMode | How to draw the texture. (Inherited from Image.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FrameWidth | When in Panel draw mode, this will be the frame width in texture percents. (Inherited from Image.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | SourceRectangle | If provided, will be used as a source rectangle when drawing images in Stretch mode. (Inherited from Image.)
Public field | Texture | Texture to draw. (Inherited from Image.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Icon Constructor

Icon Constructor
Create a new icon. Note: if you want to use your own texture for the icon, simply set 'icon' to be IconType.None and replace 'Texture' with your own texture after it is created.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Icon(
    IconType icon,
    Anchor anchor = Anchor.Auto,
    float scale = 1f,
    bool background = false,
    Nullable<Vector2> offset = null
)

Parameters

icon
Type: GeonBit.UI.EntitiesIconType
A pre-defined icon to draw.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
scale (Optional)
Type: SystemSingle
Icon default scale.
background (Optional)
Type: SystemBoolean
Weather or not to show icon inventory-like background.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Icon Class


Icon Properties

Icon Properties

The Icon type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

Icon Class


Icon Methods

Icon Methods

The Icon type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcAutoHeight | Calculate height automatically based on width, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently 100 units, calling this function will update this image height to be 100 / 2 = 50. (Inherited from Image.)
Public method | CalcAutoWidth | Calculate width automatically based on height, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently 100 units, calling this function will update this image width to be 100 x 2 = 200. (Inherited from Image.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetColorAt | Get texture color at a given coordinates. (Inherited from Image.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetTextureCoordsAt | Convert a given position to texture coords of this image. (Inherited from Image.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | SetTextureColorAt | Set texture color at a given coordinates. Note: this will affect all entities using this texture. (Inherited from Image.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

Icon Class


Icon Fields

Icon Fields

The Icon type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
 | BackgroundSize | Icon background size in pixels.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default icon size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for icons. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | DrawBackground | If true, will draw inventory-like background to this icon.
Public field | DrawMode | How to draw the texture. (Inherited from Image.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FrameWidth | When in Panel draw mode, this will be the frame width in texture percents. (Inherited from Image.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | SourceRectangle | If provided, will be used as a source rectangle when drawing images in Stretch mode. (Inherited from Image.)
Public field | Texture | Texture to draw. (Inherited from Image.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Icon Class


Icon.BackgroundSize Field

IconBackgroundSize Field
Icon background size in pixels.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static int BackgroundSize

Field Value

Type: Int32
See Also

Reference

Icon Class


Icon.DefaultSize Field

IconDefaultSize Field
Default icon size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

Icon Class


Icon.DefaultStyle Field

IconDefaultStyle Field
Default styling for icons. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Icon Class


Icon.DrawBackground Field

IconDrawBackground Field
If true, will draw inventory-like background to this icon.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool DrawBackground

Field Value

Type: Boolean
See Also

Reference

Icon Class


IconType Enumeration

IconType Enumeration
Pre-defined icons you can use.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum IconType
Members
Member name | Value | Description
Sword | 0 | 'Sword' Icon.
Shield | 1 | 'Shield' Icon.
Armor | 2 | 'Armor' Icon.
Ring | 3 | 'Ring' Icon.
RingRuby | 4 | 'RingRuby' Icon.
RingGold | 5 | 'RingGold' Icon.
RingGoldRuby | 6 | 'RingGoldRuby' Icon.
Heart | 7 | 'Heart' Icon.
Apple | 8 | 'Apple' Icon.
MagicWand | 9 | 'MagicWand' Icon.
Book | 10 | 'Book' Icon.
Key | 11 | 'Key' Icon.
Scroll | 12 | 'Scroll' Icon.
Skull | 13 | 'Skull' Icon.
Bone | 14 | 'Bone' Icon.
RubyPink | 15 | 'RubyPink' Icon.
RubyBlue | 16 | 'RubyBlue' Icon.
RubyGreen | 17 | 'RubyGreen' Icon.
RubyRed | 18 | 'RubyRed' Icon.
RubyPurple | 19 | 'RubyPurple' Icon.
Diamond | 20 | 'Diamond' Icon.
Helmet | 21 | 'Helmet' Icon.
Shovel | 22 | 'Shovel' Icon.
Explanation | 23 | 'Explanation' Icon.
Sack | 24 | 'Sack' Icon.
GoldCoins | 25 | 'GoldCoins' Icon.
MagicBook | 26 | 'MagicBook' Icon.
Map | 27 | 'Map' Icon.
Feather | 28 | 'Feather' Icon.
ShieldAndSword | 29 | 'ShieldAndSword' Icon.
Cubes | 30 | 'Cubes' Icon.
FloppyDisk | 31 | 'FloppyDisk' Icon.
BloodySword | 32 | 'BloodySword' Icon.
Axe | 33 | 'Axe' Icon.
PotionRed | 34 | 'PotionRed' Icon.
PotionYellow | 35 | 'PotionYellow' Icon.
PotionPurple | 36 | 'PotionPurple' Icon.
PotionBlue | 37 | 'PotionBlue' Icon.
PotionCyan | 38 | 'PotionCyan' Icon.
PotionGreen | 39 | 'PotionGreen' Icon.
Pistol | 40 | 'Pistol' Icon.
SilverShard | 41 | 'SilverShard' Icon.
GoldShard | 42 | 'GoldShard' Icon.
OrbRed | 43 | 'OrbRed' Icon.
OrbBlue | 44 | 'OrbBlue' Icon.
OrbGreen | 45 | 'OrbGreen' Icon.
ZoomIn | 46 | 'ZoomIn' Icon.
ZoomOut | 47 | 'ZoomOut' Icon.
None | 48 | Special icon that is just an empty texture.
See Also

Reference


Image Class

Image Class
A renderable image (draw custom texture on UI entities).
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesImage
GeonBit.UI.EntitiesIcon

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Image : Entity

The Image type exposes the following members.

Constructors
 | Name | Description
Public method | Image | Create the new image entity.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcAutoHeight | Calculate height automatically based on width, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently 100 units, calling this function will update this image height to be 100 / 2 = 50.
Public method | CalcAutoWidth | Calculate width automatically based on height, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently 100 units, calling this function will update this image width to be 100 x 2 = 200.
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetColorAt | Get texture color at a given coordinates.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetTextureCoordsAt | Convert a given position to texture coords of this image.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | SetTextureColorAt | Set texture color at a given coordinates. Note: this will affect all entities using this texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for images. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | DrawMode | How to draw the texture.
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FrameWidth | When in Panel draw mode, this will be the frame width in texture percents.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | SourceRectangle | If provided, will be used as a source rectangle when drawing images in Stretch mode.
Public field | Texture | Texture to draw.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Image Constructor

Image Constructor
Create the new image entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Image(
    Texture2D texture,
    Vector2 size,
    ImageDrawMode drawMode = ImageDrawMode.Stretch,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

texture
Type: Texture2D
Image texture.
size
Type: Vector2
Image size.
drawMode (Optional)
Type: GeonBit.UI.EntitiesImageDrawMode
How to draw the image (see ImageDrawMode for more info).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Poisition anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Image Class


Image Properties

Image Properties

The Image type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

Image Class


Image Methods

Image Methods

The Image type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcAutoHeight | Calculate height automatically based on width, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently 100 units, calling this function will update this image height to be 100 / 2 = 50.
Public method | CalcAutoWidth | Calculate width automatically based on height, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently 100 units, calling this function will update this image width to be 100 x 2 = 200.
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetColorAt | Get texture color at a given coordinates.
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetTextureCoordsAt | Convert a given position to texture coords of this image.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | SetTextureColorAt | Set texture color at a given coordinates. Note: this will affect all entities using this texture.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

Image Class


Image.CalcAutoHeight Method

ImageCalcAutoHeight Method
Calculate height automatically based on width, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its width in pixels is currently 100 units, calling this function will update this image height to be 100 / 2 = 50.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void CalcAutoHeight()
See Also

Reference

Image Class


Image.CalcAutoWidth Method

ImageCalcAutoWidth Method
Calculate width automatically based on height, to maintain texture's original ratio. For example if you have a texture of 400x200 pixels (eg 2:1 ratio) and its height in pixels is currently 100 units, calling this function will update this image width to be 100 x 2 = 200.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void CalcAutoWidth()
See Also

Reference

Image Class


Image.GetColorAt Method

ImageGetColorAt Method
Get texture color at a given coordinates.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color GetColorAt(
    Point textureCoords
)

Parameters

textureCoords
Type: Point
Texture coords to get color for.

Return Value

Type: Color
Color of texture at the given texture coords.
See Also

Reference

Image Class


Image.GetTextureCoordsAt Method

ImageGetTextureCoordsAt Method
Convert a given position to texture coords of this image.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Point GetTextureCoordsAt(
    Vector2 pos
)

Parameters

pos
Type: Vector2
Position to convert.

Return Value

Type: Point
Texture coords from position.
See Also

Reference

Image Class


Image.SetTextureColorAt Method

ImageSetTextureColorAt Method
Set texture color at a given coordinates. Note: this will affect all entities using this texture.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetTextureColorAt(
    Point textureCoords,
    Color color
)

Parameters

textureCoords
Type: Point
Texture coords to set color for.
color
Type: Color
New color to set.
See Also

Reference

Image Class


Image Fields

Image Fields

The Image type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for images. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | DrawMode | How to draw the texture.
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FrameWidth | When in Panel draw mode, this will be the frame width in texture percents.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | SourceRectangle | If provided, will be used as a source rectangle when drawing images in Stretch mode.
Public field | Texture | Texture to draw.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Image Class


Image.DefaultStyle Field

ImageDefaultStyle Field
Default styling for images. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Image Class


Image.DrawMode Field

ImageDrawMode Field
How to draw the texture.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ImageDrawMode DrawMode

Field Value

Type: ImageDrawMode
See Also

Reference

Image Class


Image.FrameWidth Field

ImageFrameWidth Field
When in Panel draw mode, this will be the frame width in texture percents.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 FrameWidth

Field Value

Type: Vector2
See Also

Reference

Image Class


Image.SourceRectangle Field

ImageSourceRectangle Field
If provided, will be used as a source rectangle when drawing images in Stretch mode.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Nullable<Rectangle> SourceRectangle

Field Value

Type: Nullable Rectangle
See Also

Reference

Image Class


Image.Texture Field

ImageTexture Field
Texture to draw.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Texture2D Texture

Field Value

Type: Texture2D
See Also

Reference

Image Class


ImageDrawMode Enumeration

ImageDrawMode Enumeration
Image drawing modes, eg how to draw the image and fill the destination rectangle with its texture.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum ImageDrawMode
Members
Member name | Value | Description
Stretch | 0 | With this mode texture will just stretch over the entire size of the destination rectangle.
Panel | 1 | With this mode texture will be tiled and drawed with a frame, just like panels.
See Also

Reference


Label Class

Label Class
Label entity is a subclass of Paragraph. Basically its the same, but with a different default styling, and serves as a sugarcoat to quickly create labels for widgets.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesParagraph
GeonBit.UI.EntitiesLabel

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Label : Paragraph

The Label type exposes the following members.

Constructors
 | Name | Description
Public method | Label | Create the label.
Top
Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Inherited from Paragraph.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for labels. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Label Constructor

Label Constructor
Create the label.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Label(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Label text.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
Optional label size.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Label Class


Label Properties

Label Properties

The Label type exposes the following members.

Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Inherited from Paragraph.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
See Also

Reference

Label Class


Label Methods

Label Methods

The Label type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
See Also

Reference

Label Class


Label Fields

Label Fields

The Label type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for labels. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Label Class


Label.DefaultStyle Field

LabelDefaultStyle Field
Default styling for labels. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Label Class


LineSpace Class

LineSpace Class
A line space is just a spacer for Auto-Anchored entities, eg a method to create artificial distance between rows.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesLineSpace

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class LineSpace : Entity

The LineSpace type exposes the following members.

Constructors
 | Name | Description
Public method | LineSpace | Create a new Line Space entity.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default size this entity will have when no size is provided or when -1 is set for either width or height.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
 | SpaceSize | Single line space height.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


LineSpace Constructor

LineSpace Constructor
Create a new Line Space entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public LineSpace(
    int spacesCount = 1
)

Parameters

spacesCount (Optional)
Type: SystemInt32
How many spaces to create.
See Also

Reference

LineSpace Class


LineSpace Properties

LineSpace Properties

The LineSpace type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

LineSpace Class


LineSpace Methods

LineSpace Methods

The LineSpace type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

LineSpace Class


LineSpace Fields

LineSpace Fields

The LineSpace type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default size this entity will have when no size is provided or when -1 is set for either width or height.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
 | SpaceSize | Single line space height.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

LineSpace Class


LineSpace.DefaultSize Field

LineSpaceDefaultSize Field
Default size this entity will have when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

LineSpace Class


LineSpace.SpaceSize Field

LineSpaceSpaceSize Field
Single line space height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float SpaceSize

Field Value

Type: Single
See Also

Reference

LineSpace Class


MulticolorParagraph Class

MulticolorParagraph Class
Multicolor Paragraph is a paragraph that supports in-text color tags that changes the fill color of the text.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesParagraph
GeonBit.UI.EntitiesMulticolorParagraph

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class MulticolorParagraph : Paragraph

The MulticolorParagraph type exposes the following members.

Constructors
 | Name | Description
Public method | MulticolorParagraph(String, Anchor, NullableVector2, NullableVector2, NullableSingle) | Create the paragraph.
Public method | MulticolorParagraph(String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2) | Create the paragraph with optional fill color and font size.
Top
Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EnableColorInstructions | If true, will enable color instructions (special codes that change fill color inside the text).
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Overrides ParagraphText.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for paragraphs. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


MulticolorParagraph Constructor

MulticolorParagraph Constructor
Overload List
 | Name | Description
Public method | MulticolorParagraph(String, Anchor, NullableVector2, NullableVector2, NullableSingle) | Create the paragraph.
Public method | MulticolorParagraph(String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2) | Create the paragraph with optional fill color and font size.
Top
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph Constructor (String, Anchor, Nullable(Vector2), Nullable(Vector2), Nullable(Single))

MulticolorParagraph Constructor (String, Anchor, NullableVector2, NullableVector2, NullableSingle)
Create the paragraph.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public MulticolorParagraph(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null,
    Nullable<float> scale = null
)

Parameters

text
Type: SystemString
Paragraph text (accept new line characters).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
Paragraph size (note: not font size, but the region that will contain the paragraph).
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
scale (Optional)
Type: SystemNullable Single
Optional font size.
See Also

Reference

MulticolorParagraph Class
MulticolorParagraph Overload


MulticolorParagraph Constructor (String, Anchor, Color, Nullable(Single), Nullable(Vector2), Nullable(Vector2))

MulticolorParagraph Constructor (String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2)
Create the paragraph with optional fill color and font size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public MulticolorParagraph(
    string text,
    Anchor anchor,
    Color color,
    Nullable<float> scale = null,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Paragraph text (accept new line characters).
anchor
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
color
Type: Color
Text fill color.
scale (Optional)
Type: SystemNullable Single
Optional font size.
size (Optional)
Type: SystemNullable Vector2
Paragraph size (note: not font size, but the region that will contain the paragraph).
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

MulticolorParagraph Class
MulticolorParagraph Overload


MulticolorParagraph Properties

MulticolorParagraph Properties

The MulticolorParagraph type exposes the following members.

Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point. (Inherited from Paragraph.)
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property. (Inherited from Paragraph.)
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words. (Inherited from Paragraph.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EnableColorInstructions | If true, will enable color instructions (special codes that change fill color inside the text).
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text. (Overrides ParagraphText.)
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property. (Inherited from Paragraph.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed. (Inherited from Paragraph.)
Top
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph.EnableColorInstructions Property

MulticolorParagraphEnableColorInstructions Property
If true, will enable color instructions (special codes that change fill color inside the text).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool EnableColorInstructions { get; set; }

Property Value

Type: Boolean
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph.Text Property

MulticolorParagraphText Property
Get / Set the paragraph text.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override string Text { get; set; }

Property Value

Type: String
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph Methods

MulticolorParagraph Methods

The MulticolorParagraph type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration. (Inherited from Paragraph.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Inherited from Paragraph.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph. (Inherited from Paragraph.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc. (Inherited from Paragraph.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Paragraph.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap (Inherited from Paragraph.)
Top
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph Fields

MulticolorParagraph Fields

The MulticolorParagraph type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text. (Inherited from Paragraph.)
Public field | BackgroundColorPadding | Extra padding for background color. (Inherited from Paragraph.)
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size. (Inherited from Paragraph.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for paragraphs. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts. (Inherited from Paragraph.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

MulticolorParagraph Class


MulticolorParagraph.DefaultStyle Field

MulticolorParagraphDefaultStyle Field
Default styling for paragraphs. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

MulticolorParagraph Class


Panel Class

Panel Class
A graphical panel or form you can create and add entities to. Used to group together entities with common logic.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesPanel
GeonBit.UI.EntitiesRootPanel
GeonBit.UI.EntitiesSelectList
GeonBit.UI.EntitiesTextInput

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Panel : Entity, IDisposable

The Panel type exposes the following members.

Constructors
 | Name | Description
Public method | Panel | Create the panel.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true.
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Overrides EntityCalcInternalRect.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target).
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for panels. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Panel Constructor

Panel Constructor
Create the panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Panel(
    Vector2 size,
    PanelSkin skin = PanelSkin.Default,
    Anchor anchor = Anchor.Center,
    Nullable<Vector2> offset = null
)

Parameters

size
Type: Vector2
Panel size.
skin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
Panel skin (texture to use). Use PanelSkin.None for invisible panels.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Panel Class


Panel Properties

Panel Properties

The Panel type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true.
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin.
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

Panel Class


Panel.PanelOverflowBehavior Property

PanelPanelOverflowBehavior Property
Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelOverflowBehavior PanelOverflowBehavior { get; set; }

Property Value

Type: PanelOverflowBehavior
See Also

Reference

Panel Class


Panel.Scrollbar Property

PanelScrollbar Property
Get the scrollbar of this panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public VerticalScrollbar Scrollbar { get; }

Property Value

Type: VerticalScrollbar
See Also

Reference

Panel Class


Panel.Skin Property

PanelSkin Property
Set / get current panel skin.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelSkin Skin { get; set; }

Property Value

Type: PanelSkin
See Also

Reference

Panel Class


Panel Methods

Panel Methods

The Panel type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Overrides EntityCalcInternalRect.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target).
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

Panel Class


Panel.CalcInternalRect Method

PanelCalcInternalRect Method
Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override Rectangle CalcInternalRect()

Return Value

Type: Rectangle
Internal destination rectangle.
See Also

Reference

Panel Class


Panel.Dispose Method

PanelDispose Method
Dispose unmanaged resources related to this panel (render target).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Dispose()

Implements

IDisposableDispose
See Also

Reference

Panel Class


Panel Fields

Panel Fields

The Panel type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for panels. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Panel Class


Panel.DefaultStyle Field

PanelDefaultStyle Field
Default styling for panels. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Panel Class


PanelOverflowBehavior Enumeration

PanelOverflowBehavior Enumeration
How to treat entities that overflow panel boundaries.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum PanelOverflowBehavior
Members
Member name | Value | Description
Overflow | 0 | Entity will be rendered as usual outside the panel boundaries.
Clipped | 1 | Entities that exceed panel boundaries will be clipped. Note: Requires render targets.
VerticalScroll | 2 | Entities that exceed panel on Y axis will create a scrollbar. Exceeding on X axis will be hidden. Note: Requires render targets.
See Also

Reference


PanelSkin Enumeration

PanelSkin Enumeration
Different panel textures you can use.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum PanelSkin
Members
Member name | Value | Description
None | -1 | No skin, eg panel itself is invisible.
Default | 0 | Default panel texture.
Fancy | 1 | Alternative panel texture.
Simple | 2 | Simple, grey panel. Useful for internal frames, eg when inside another panel.
Golden | 3 | Shiny golden panel.
ListBackground | 4 | Special panel skin used for lists and input background.
See Also

Reference


PanelTabs Class

PanelTabs Class
A graphical panel or form you can create and add entities to. Used to group together entities with common logic.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesPanelTabs

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class PanelTabs : Entity

The PanelTabs type exposes the following members.

Constructors
 | Name | Description
Public method | PanelTabs | Create the panel tabs.
Top
Properties
 | Name | Description
Public property | ActiveTab | Get the currently active tab.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BackgroundSkin | Optional panel skin to set as tabs background.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddTab | Add a new tab to the panel tabs.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SelectTab | Select tab to be the currently active tab.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultButtonParagraphStyle | Default styling for panel buttons paragraphs. Note: loaded from UI theme xml file.
 | DefaultButtonStyle | Default styling for panel buttons. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


PanelTabs Constructor

PanelTabs Constructor
Create the panel tabs.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelTabs()
See Also

Reference

PanelTabs Class


PanelTabs Properties

PanelTabs Properties

The PanelTabs type exposes the following members.

Properties
 | Name | Description
Public property | ActiveTab | Get the currently active tab.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BackgroundSkin | Optional panel skin to set as tabs background.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

PanelTabs Class


PanelTabs.ActiveTab Property

PanelTabsActiveTab Property
Get the currently active tab.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelTabsTabData ActiveTab { get; }

Property Value

Type: PanelTabsTabData
See Also

Reference

PanelTabs Class


PanelTabs.BackgroundSkin Property

PanelTabsBackgroundSkin Property
Optional panel skin to set as tabs background.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelSkin BackgroundSkin { get; set; }

Property Value

Type: PanelSkin
See Also

Reference

PanelTabs Class


PanelTabs Methods

PanelTabs Methods

The PanelTabs type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddTab | Add a new tab to the panel tabs.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SelectTab | Select tab to be the currently active tab.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

PanelTabs Class


PanelTabs.AddTab Method

PanelTabsAddTab Method
Add a new tab to the panel tabs.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PanelTabsTabData AddTab(
    string name,
    PanelSkin panelSkin = PanelSkin.None
)

Parameters

name
Type: SystemString
Tab name (also what will appear on the panel button).
panelSkin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
Panel skin to use for this panel.

Return Value

Type: PanelTabsTabData
The new tab we created - contains the panel and the button to switch it.
See Also

Reference

PanelTabs Class


PanelTabs.SelectTab Method

PanelTabsSelectTab Method
Select tab to be the currently active tab.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SelectTab(
    string name
)

Parameters

name
Type: SystemString
Tab identifier to select.
See Also

Reference

PanelTabs Class


PanelTabs Fields

PanelTabs Fields

The PanelTabs type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultButtonParagraphStyle | Default styling for panel buttons paragraphs. Note: loaded from UI theme xml file.
 | DefaultButtonStyle | Default styling for panel buttons. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

PanelTabs Class


PanelTabs.DefaultButtonParagraphStyle Field

PanelTabsDefaultButtonParagraphStyle Field
Default styling for panel buttons paragraphs. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultButtonParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

PanelTabs Class


PanelTabs.DefaultButtonStyle Field

PanelTabsDefaultButtonStyle Field
Default styling for panel buttons. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultButtonStyle

Field Value

Type: StyleSheet
See Also

Reference

PanelTabs Class


PanelTabs.TabData Class

PanelTabsTabData Class
Contains the button and panel of a single tab in the PanelTabs.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesPanelTabsTabData

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TabData

The PanelTabsTabData type exposes the following members.

Constructors
 | Name | Description
Public method | PanelTabsTabData | Create the new tab type.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
Fields
 | Name | Description
Public field | button | The tab top button.
Public field | name | Tab identifier / name.
Public field | panel | The tab panel.
Top
See Also

Reference


PanelTabs.TabData Constructor

PanelTabsTabData Constructor
Create the new tab type.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TabData(
    string tabName,
    Panel tabPanel,
    Button tabButton
)

Parameters

tabName
Type: SystemString
Tab name / identifier.
tabPanel
Type: GeonBit.UI.EntitiesPanel
Tab panel.
tabButton
Type: GeonBit.UI.EntitiesButton
Tab button.
See Also

Reference

PanelTabsTabData Class


TabData Methods

TabData Methods

The PanelTabsTabData type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

PanelTabsTabData Class


TabData Fields

TabData Fields

The PanelTabsTabData type exposes the following members.

Fields
 | Name | Description
Public field | button | The tab top button.
Public field | name | Tab identifier / name.
Public field | panel | The tab panel.
Top
See Also

Reference

PanelTabsTabData Class


PanelTabs.TabData.button Field

PanelTabsTabDatabutton Field
The tab top button.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Button button

Field Value

Type: Button
See Also

Reference

PanelTabsTabData Class


PanelTabs.TabData.name Field

PanelTabsTabDataname Field
Tab identifier / name.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public readonly string name

Field Value

Type: String
See Also

Reference

PanelTabsTabData Class


PanelTabs.TabData.panel Field

PanelTabsTabDatapanel Field
The tab panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Panel panel

Field Value

Type: Panel
See Also

Reference

PanelTabsTabData Class


Paragraph Class

Paragraph Class
Paragraph is a renderable text. It can be multiline, wrap words, have outline, etc.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesParagraph
GeonBit.UI.EntitiesHeader
GeonBit.UI.EntitiesLabel
GeonBit.UI.EntitiesMulticolorParagraph

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Paragraph : Entity

The Paragraph type exposes the following members.

Constructors
 | Name | Description
Public method | Paragraph(String, Anchor, NullableVector2, NullableVector2, NullableSingle) | Create the paragraph.
Public method | Paragraph(String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2) | Create the paragraph with optional fill color and font size.
Top
Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point.
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text.
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed.
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration.
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Overrides EntityGetActualDestRect.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph.
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc.
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Overrides EntityUpdateDestinationRects.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text.
Public field | BackgroundColorPadding | Extra padding for background color.
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size.
 | BaseSize | Base font size. Change this property to affect the size of all paragraphs and other text entities.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for paragraphs. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Paragraph Constructor

Paragraph Constructor
Overload List
 | Name | Description
Public method | Paragraph(String, Anchor, NullableVector2, NullableVector2, NullableSingle) | Create the paragraph.
Public method | Paragraph(String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2) | Create the paragraph with optional fill color and font size.
Top
See Also

Reference

Paragraph Class


Paragraph Constructor (String, Anchor, Nullable(Vector2), Nullable(Vector2), Nullable(Single))

Paragraph Constructor (String, Anchor, NullableVector2, NullableVector2, NullableSingle)
Create the paragraph.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null,
    Nullable<float> scale = null
)

Parameters

text
Type: SystemString
Paragraph text (accept new line characters).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
Paragraph size (note: not font size, but the region that will contain the paragraph).
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
scale (Optional)
Type: SystemNullable Single
Optional font size.
See Also

Reference

Paragraph Class
Paragraph Overload


Paragraph Constructor (String, Anchor, Color, Nullable(Single), Nullable(Vector2), Nullable(Vector2))

Paragraph Constructor (String, Anchor, Color, NullableSingle, NullableVector2, NullableVector2)
Create the paragraph with optional fill color and font size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph(
    string text,
    Anchor anchor,
    Color color,
    Nullable<float> scale = null,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null
)

Parameters

text
Type: SystemString
Paragraph text (accept new line characters).
anchor
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
color
Type: Color
Text fill color.
scale (Optional)
Type: SystemNullable Single
Optional font size.
size (Optional)
Type: SystemNullable Vector2
Paragraph size (note: not font size, but the region that will contain the paragraph).
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Paragraph Class
Paragraph Overload


Paragraph Properties

Paragraph Properties

The Paragraph type exposes the following members.

Properties
 | Name | Description
Public property | AddHyphenWhenBreakWord | If true and a long word is broken due to word wrap, will add hyphen at the breaking point.
Public property | AlignToCenter | Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property.
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | BreakWordsIfMust | If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Text | Get / Set the paragraph text.
Public property | TextStyle | Current font style - this is just a sugarcoat to access the default font style property.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Public property | WrapWords | Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed.
Top
See Also

Reference

Paragraph Class


Paragraph.AddHyphenWhenBreakWord Property

ParagraphAddHyphenWhenBreakWord Property
If true and a long word is broken due to word wrap, will add hyphen at the breaking point.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AddHyphenWhenBreakWord { get; set; }

Property Value

Type: Boolean
See Also

Reference

Paragraph Class


Paragraph.AlignToCenter Property

ParagraphAlignToCenter Property
Should we align text to center - this is just a sugarcoat to access the default force-align-to-center style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AlignToCenter { get; set; }

Property Value

Type: Boolean
See Also

Reference

Paragraph Class


Paragraph.BreakWordsIfMust Property

ParagraphBreakWordsIfMust Property
If WrapWords is true and there's a word that's too long (eg longer than max width), will break the word in the middle. If false, word wrap will only break lines in between words (eg spaces) and never break words.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool BreakWordsIfMust { get; set; }

Property Value

Type: Boolean
See Also

Reference

Paragraph Class


Paragraph.Text Property

ParagraphText Property
Get / Set the paragraph text.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual string Text { get; set; }

Property Value

Type: String
See Also

Reference

Paragraph Class


Paragraph.TextStyle Property

ParagraphTextStyle Property
Current font style - this is just a sugarcoat to access the default font style property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public FontStyle TextStyle { get; set; }

Property Value

Type: FontStyle
See Also

Reference

Paragraph Class


Paragraph.WrapWords Property

ParagraphWrapWords Property
Get / Set word wrap mode. If true, and text exceeded destination width, the paragraph will wrap words by adding line breaks where needed.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool WrapWords { get; set; }

Property Value

Type: Boolean
See Also

Reference

Paragraph Class


Paragraph Methods

Paragraph Methods

The Paragraph type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | CalcTextActualRectWithWrap | Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration.
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap). (Overrides EntityGetActualDestRect.)
Public method | GetCharacterActualSize | Get the size, in pixels, of a single character in paragraph.
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetProcessedText | Return the processed text that is actually displayed on screen, after word-wrap etc.
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Overrides EntityUpdateDestinationRects.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Public method | WrapText | Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap
Top
See Also

Reference

Paragraph Class


Paragraph.CalcTextActualRectWithWrap Method

ParagraphCalcTextActualRectWithWrap Method
Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void CalcTextActualRectWithWrap()
See Also

Reference

Paragraph Class


Paragraph.GetActualDestRect Method

ParagraphGetActualDestRect Method
Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override Rectangle GetActualDestRect()

Return Value

Type: Rectangle
Actual paragraph destination rect.
See Also

Reference

Paragraph Class


Paragraph.GetCharacterActualSize Method

ParagraphGetCharacterActualSize Method
Get the size, in pixels, of a single character in paragraph.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 GetCharacterActualSize()

Return Value

Type: Vector2
Actual size, in pixels, of a single character.
See Also

Reference

Paragraph Class


Paragraph.GetProcessedText Method

ParagraphGetProcessedText Method
Return the processed text that is actually displayed on screen, after word-wrap etc.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string GetProcessedText()

Return Value

Type: String
Actual displayed text with word-wrap and other runtime processing.
See Also

Reference

Paragraph Class


Paragraph.UpdateDestinationRects Method

ParagraphUpdateDestinationRects Method
Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void UpdateDestinationRects()
See Also

Reference

Paragraph Class


Paragraph.WrapText Method

ParagraphWrapText Method
Wrap text to fit destination rect. Most if this code is coming from: http://stackoverflow.com/questions/15986473/how-do-i-implement-word-wrap

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string WrapText(
    SpriteFont font,
    string text,
    float maxLineWidth,
    float fontSize
)

Parameters

font
Type: SpriteFont
Font of the text to wrap.
text
Type: SystemString
Text content.
maxLineWidth
Type: SystemSingle
Max line width to wrap.
fontSize
Type: SystemSingle
Font scale (scale you are about to use when drawing the text).

Return Value

Type: String
Text that is wrapped to fit the given length (by adding line breaks at the right places).
See Also

Reference

Paragraph Class


Paragraph Fields

Paragraph Fields

The Paragraph type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BackgroundColor | Optional background color for text.
Public field | BackgroundColorPadding | Extra padding for background color.
Public field | BackgroundColorUseBoxSize | If true and have background color, will use the paragraph box size for it instead of the text actual size.
 | BaseSize | Base font size. Change this property to affect the size of all paragraphs and other text entities.
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultStyle | Default styling for paragraphs. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | FontOverride | An optional font you can set to override the default fonts.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Paragraph Class


Paragraph.BackgroundColor Field

ParagraphBackgroundColor Field
Optional background color for text.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color BackgroundColor

Field Value

Type: Color
See Also

Reference

Paragraph Class


Paragraph.BackgroundColorPadding Field

ParagraphBackgroundColorPadding Field
Extra padding for background color.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Point BackgroundColorPadding

Field Value

Type: Point
See Also

Reference

Paragraph Class


Paragraph.BackgroundColorUseBoxSize Field

ParagraphBackgroundColorUseBoxSize Field
If true and have background color, will use the paragraph box size for it instead of the text actual size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool BackgroundColorUseBoxSize

Field Value

Type: Boolean
See Also

Reference

Paragraph Class


Paragraph.BaseSize Field

ParagraphBaseSize Field
Base font size. Change this property to affect the size of all paragraphs and other text entities.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float BaseSize

Field Value

Type: Single
See Also

Reference

Paragraph Class


Paragraph.DefaultStyle Field

ParagraphDefaultStyle Field
Default styling for paragraphs. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Paragraph Class


Paragraph.FontOverride Field

ParagraphFontOverride Field
An optional font you can set to override the default fonts.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SpriteFont FontOverride

Field Value

Type: SpriteFont
See Also

Reference

Paragraph Class


ProgressBar Class

ProgressBar Class
A sub-class of the slider entity, with graphics more fitting for a progress bar or things like hp bar etc. Behaves the same as a slider, if you want it to be for display only (and not changeable by user), simple set Locked = true.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesSlider
GeonBit.UI.EntitiesProgressBar

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ProgressBar : Slider

The ProgressBar type exposes the following members.

Constructors
 | Name | Description
Public method | ProgressBar(UInt32, UInt32, Anchor, NullableVector2) | Create progress bar.
Public method | ProgressBar(UInt32, UInt32, Vector2, Anchor, NullableVector2) | Create progress bar with size.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive). (Inherited from Slider.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive). (Inherited from Slider.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range. (Inherited from Slider.)
Public property | Value | Current slider value. (Inherited from Slider.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step. (Inherited from Slider.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max. (Inherited from Slider.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Inherited from Slider.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | Caption | An optional caption to display over the center of the progress bar.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultFillStyle | Default styling for the progress bar fill part. Note: loaded from UI theme xml file.
 | DefaultSize | Default progressbar size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for progress bar. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | ProgressFill | The fill part of the progress bar.
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


ProgressBar Constructor

ProgressBar Constructor
Overload List
 | Name | Description
Public method | ProgressBar(UInt32, UInt32, Anchor, NullableVector2) | Create progress bar.
Public method | ProgressBar(UInt32, UInt32, Vector2, Anchor, NullableVector2) | Create progress bar with size.
Top
See Also

Reference

ProgressBar Class


ProgressBar Constructor (UInt32, UInt32, Anchor, Nullable(Vector2))

ProgressBar Constructor (UInt32, UInt32, Anchor, NullableVector2)
Create progress bar.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ProgressBar(
    uint min = 0,
    uint max = 10,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

min (Optional)
Type: SystemUInt32
Min value.
max (Optional)
Type: SystemUInt32
Max value.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

ProgressBar Class
ProgressBar Overload


ProgressBar Constructor (UInt32, UInt32, Vector2, Anchor, Nullable(Vector2))

ProgressBar Constructor (UInt32, UInt32, Vector2, Anchor, NullableVector2)
Create progress bar with size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ProgressBar(
    uint min,
    uint max,
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

min
Type: SystemUInt32
Min value.
max
Type: SystemUInt32
Max value.
size
Type: Vector2
Entity size.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

ProgressBar Class
ProgressBar Overload


ProgressBar Properties

ProgressBar Properties

The ProgressBar type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive). (Inherited from Slider.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive). (Inherited from Slider.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range. (Inherited from Slider.)
Public property | Value | Current slider value. (Inherited from Slider.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

ProgressBar Class


ProgressBar Methods

ProgressBar Methods

The ProgressBar type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step. (Inherited from Slider.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max. (Inherited from Slider.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Inherited from Slider.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

ProgressBar Class


ProgressBar Fields

ProgressBar Fields

The ProgressBar type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | Caption | An optional caption to display over the center of the progress bar.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultFillStyle | Default styling for the progress bar fill part. Note: loaded from UI theme xml file.
 | DefaultSize | Default progressbar size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for progress bar. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | ProgressFill | The fill part of the progress bar.
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

ProgressBar Class


ProgressBar.Caption Field

ProgressBarCaption Field
An optional caption to display over the center of the progress bar.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Label Caption

Field Value

Type: Label
See Also

Reference

ProgressBar Class


ProgressBar.DefaultFillStyle Field

ProgressBarDefaultFillStyle Field
Default styling for the progress bar fill part. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultFillStyle

Field Value

Type: StyleSheet
See Also

Reference

ProgressBar Class


ProgressBar.DefaultSize Field

ProgressBarDefaultSize Field
Default progressbar size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

ProgressBar Class


ProgressBar.DefaultStyle Field

ProgressBarDefaultStyle Field
Default styling for progress bar. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

ProgressBar Class


ProgressBar.ProgressFill Field

ProgressBarProgressFill Field
The fill part of the progress bar.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Image ProgressFill

Field Value

Type: Image
See Also

Reference

ProgressBar Class


RadioButton Class

RadioButton Class
A Radio Button entity is like a checkbox (label with a box next to it that can be checked / unchecked) with the exception that whenever a radio button is checked, all its siblings are unchecked automatically.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesCheckBox
GeonBit.UI.EntitiesRadioButton

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class RadioButton : CheckBox

The RadioButton type exposes the following members.

Constructors
 | Name | Description
Public method | RadioButton | Create the radio button.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | CheckBox current value, eg if its checked or unchecked. (Inherited from CheckBox.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the checkbox a natrually-interactable entity. (Inherited from CheckBox.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | CanUncheck | If set to true, clicking on an already checked radio button will uncheck if. If false (default), will do nothing.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for radio button label. Note: loaded from UI theme xml file.
 | DefaultSize | Default radio buttons size in pixels.
 | DefaultStyle | Default styling for the radio button itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | CheckBox label. Use this if you want to change the checkbox text or font style. (Inherited from CheckBox.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
Remarks
Radio Buttons only affect their direct siblings, so if you need multiple groups of radio buttons on the same panel you can use internal panels to group them together.
See Also

Reference


RadioButton Constructor

RadioButton Constructor
Create the radio button.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public RadioButton(
    string text,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> size = null,
    Nullable<Vector2> offset = null,
    bool isChecked = false
)

Parameters

text
Type: SystemString
Radio button label text.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
size (Optional)
Type: SystemNullable Vector2
Radio button size.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
isChecked (Optional)
Type: SystemBoolean
If true, radio button will be created as checked.
See Also

Reference

RadioButton Class


RadioButton Properties

RadioButton Properties

The RadioButton type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Checked | CheckBox current value, eg if its checked or unchecked. (Inherited from CheckBox.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

RadioButton Class


RadioButton Methods

RadioButton Methods

The RadioButton type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the checkbox a natrually-interactable entity. (Inherited from CheckBox.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

RadioButton Class


RadioButton Fields

RadioButton Fields

The RadioButton type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | CanUncheck | If set to true, clicking on an already checked radio button will uncheck if. If false (default), will do nothing.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default styling for radio button label. Note: loaded from UI theme xml file.
 | DefaultSize | Default radio buttons size in pixels.
 | DefaultStyle | Default styling for the radio button itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | CheckBox label. Use this if you want to change the checkbox text or font style. (Inherited from CheckBox.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

RadioButton Class


RadioButton.CanUncheck Field

RadioButtonCanUncheck Field
If set to true, clicking on an already checked radio button will uncheck if. If false (default), will do nothing.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool CanUncheck

Field Value

Type: Boolean
See Also

Reference

RadioButton Class


RadioButton.DefaultParagraphStyle Field

RadioButtonDefaultParagraphStyle Field
Default styling for radio button label. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

RadioButton Class


RadioButton.DefaultSize Field

RadioButtonDefaultSize Field
Default radio buttons size in pixels.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

RadioButton Class


RadioButton.DefaultStyle Field

RadioButtonDefaultStyle Field
Default styling for the radio button itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

RadioButton Class


RootPanel Class

RootPanel Class
A special panel used as the root panel that covers the entire screen. This panel is used internally to serve as the constant root entity in the entities tree.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesPanel
GeonBit.UI.EntitiesRootPanel

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class RootPanel : Panel

The RootPanel type exposes the following members.

Constructors
 | Name | Description
Public method | RootPanel | Create the root panel.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Override the function to calculate the destination rectangle, so the root panel will always cover the entire screen. (Overrides EntityCalcDestRect.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Overrides EntityDraw(SpriteBatch).)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Overrides EntityUpdateDestinationRectsIfDirty.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


RootPanel Constructor

RootPanel Constructor
Create the root panel.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public RootPanel()
See Also

Reference

RootPanel Class


RootPanel Properties

RootPanel Properties

The RootPanel type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

RootPanel Class


RootPanel Methods

RootPanel Methods

The RootPanel type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Override the function to calculate the destination rectangle, so the root panel will always cover the entire screen. (Overrides EntityCalcDestRect.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Overrides EntityDraw(SpriteBatch).)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Return true if this entity is naturally interactable, like buttons, lists, etc. Entities that are not naturally interactable are things like paragraph, colored rectangle, icon, etc. (Inherited from Entity.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Overrides EntityUpdateDestinationRectsIfDirty.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

RootPanel Class


RootPanel.CalcDestRect Method

RootPanelCalcDestRect Method
Override the function to calculate the destination rectangle, so the root panel will always cover the entire screen.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override Rectangle CalcDestRect()

Return Value

Type: Rectangle
Rectangle in the size of the whole screen.
See Also

Reference

RootPanel Class


RootPanel.Draw Method

RootPanelDraw Method
Draw this entity and its children.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void Draw(
    SpriteBatch spriteBatch
)

Parameters

spriteBatch
Type: SpriteBatch
SpriteBatch to use for drawing.
See Also

Reference

RootPanel Class


RootPanel.UpdateDestinationRectsIfDirty Method

RootPanelUpdateDestinationRectsIfDirty Method
Update dest rect and internal dest rect, but only if needed (eg if something changed since last update).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void UpdateDestinationRectsIfDirty()
See Also

Reference

RootPanel Class


RootPanel Fields

RootPanel Fields

The RootPanel type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

RootPanel Class


SelectList Class

SelectList Class
List of items (strings) user can scroll and pick from.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesPanel
GeonBit.UI.EntitiesSelectList

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class SelectList : Panel

The SelectList type exposes the following members.

Constructors
 | Name | Description
Public method | SelectList(Anchor, NullableVector2) | Create the select list with default values.
Public method | SelectList(Vector2, Anchor, NullableVector2, PanelSkin) | Create the select list.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Count | How many items currently in the list.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | Empty | Is the list currently empty.
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ScrollPosition | Current scrollbar position.
Public property | SelectedIndex | Currently selected item index (or -1 if none is selected).
Public property | SelectedValue | Currently selected item value (or null if none is selected).
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | ClearItems | Remove all items from the list.
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the list a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | MatchHeightToList | Calculate the height of the select list to match the height of all the items in it.
Public method | PropagateEventsTo(DropDown) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | PropagateEventsTo(Entity) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | PropagateEventsTo(SelectList) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Public method | scrollToEnd | Move scrollbar to last item in list.
Public method | ScrollToSelected | Move scrollbar to currently selected item.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Unselect | Clear current selection.
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AddWhenClipping | String to append when clipping items width.
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AllowReselectValue | If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
Public field | ClipTextIfOverflow | If true and an item in the list is too long for its width, the list will cut its value to fit width.
 | DefaultParagraphStyle | Default styling for select list labels. Note: loaded from UI theme xml file.
 | DefaultSize | Default select list size in pixels.
 | DefaultStyle | Default styling for the select list itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | ExtraSpaceBetweenLines | Extra space (in pixels) between items on Y axis.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | ItemsScale | Scale items in list.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | LockedItems | Optional dictionary of list indexes you want to lock. Every item in this dictionary set to true will be locked and user won't be able to select it.
Public field | LockSelection | When set to true, users cannot change the currently selected value. Note: unlike the basic entity "Locked" that prevent all input from entity and its children, this method of locking will still allow users to scroll through the list, thus making it useable as a read-only list entity.
Public field | MaxItems | If provided, will not be able to add any more of this number of items.
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnListChange | Special callback to execute when list size changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


SelectList Constructor

SelectList Constructor
Overload List
 | Name | Description
Public method | SelectList(Anchor, NullableVector2) | Create the select list with default values.
Public method | SelectList(Vector2, Anchor, NullableVector2, PanelSkin) | Create the select list.
Top
See Also

Reference

SelectList Class


SelectList Constructor (Anchor, Nullable(Vector2))

SelectList Constructor (Anchor, NullableVector2)
Create the select list with default values.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SelectList(
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

SelectList Class
SelectList Overload


SelectList Constructor (Vector2, Anchor, Nullable(Vector2), PanelSkin)

SelectList Constructor (Vector2, Anchor, NullableVector2, PanelSkin)
Create the select list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SelectList(
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null,
    PanelSkin skin = PanelSkin.ListBackground
)

Parameters

size
Type: Vector2
List size.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
skin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
SelectList skin, eg which texture to use.
See Also

Reference

SelectList Class
SelectList Overload


SelectList Properties

SelectList Properties

The SelectList type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Count | How many items currently in the list.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | Empty | Is the list currently empty.
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ScrollPosition | Current scrollbar position.
Public property | SelectedIndex | Currently selected item index (or -1 if none is selected).
Public property | SelectedValue | Currently selected item value (or null if none is selected).
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

SelectList Class


SelectList.Count Property

SelectListCount Property
How many items currently in the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Count { get; }

Property Value

Type: Int32
See Also

Reference

SelectList Class


SelectList.Empty Property

SelectListEmpty Property
Is the list currently empty.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Empty { get; }

Property Value

Type: Boolean
See Also

Reference

SelectList Class


SelectList.ScrollPosition Property

SelectListScrollPosition Property
Current scrollbar position.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ScrollPosition { get; set; }

Property Value

Type: Int32
See Also

Reference

SelectList Class


SelectList.SelectedIndex Property

SelectListSelectedIndex Property
Currently selected item index (or -1 if none is selected).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int SelectedIndex { get; set; }

Property Value

Type: Int32
See Also

Reference

SelectList Class


SelectList.SelectedValue Property

SelectListSelectedValue Property
Currently selected item value (or null if none is selected).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string SelectedValue { get; set; }

Property Value

Type: String
See Also

Reference

SelectList Class


SelectList Methods

SelectList Methods

The SelectList type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | ClearItems | Remove all items from the list.
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the list a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | MatchHeightToList | Calculate the height of the select list to match the height of all the items in it.
Public method | PropagateEventsTo(DropDown) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | PropagateEventsTo(Entity) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | PropagateEventsTo(SelectList) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Public method | scrollToEnd | Move scrollbar to last item in list.
Public method | ScrollToSelected | Move scrollbar to currently selected item.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Unselect | Clear current selection.
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

SelectList Class


SelectList.AddItem Method

SelectListAddItem Method
Overload List
 | Name | Description
Public method | AddItem(String) | Add value to list.
Public method | AddItem(String, Int32) | Add value to list at a specific index.
Top
See Also

Reference

SelectList Class


SelectList.AddItem Method (String)

SelectListAddItem Method (String)
Add value to list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddItem(
    string value
)

Parameters

value
Type: SystemString
Value to add.
Remarks
Values can be duplicated, however, this will cause annoying behavior when trying to delete or select by value (will always pick the first found).
See Also

Reference

SelectList Class
AddItem Overload


SelectList.AddItem Method (String, Int32)

SelectListAddItem Method (String, Int32)
Add value to list at a specific index.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddItem(
    string value,
    int index
)

Parameters

value
Type: SystemString
Value to add.
index
Type: SystemInt32
Index to insert the new item into.
Remarks
Values can be duplicated, however, this will cause annoying behavior when trying to delete or select by value (will always pick the first found).
See Also

Reference

SelectList Class
AddItem Overload


SelectList.ClearItems Method

SelectListClearItems Method
Remove all items from the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ClearItems()
See Also

Reference

SelectList Class


SelectList.IsNaturallyInteractable Method

SelectListIsNaturallyInteractable Method
Is the list a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

SelectList Class


SelectList.MatchHeightToList Method

SelectListMatchHeightToList Method
Calculate the height of the select list to match the height of all the items in it.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void MatchHeightToList()
See Also

Reference

SelectList Class


SelectList.PropagateEventsTo Method

SelectListPropagateEventsTo Method
Overload List
 | Name | Description
Public method | PropagateEventsTo(DropDown) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Public method | PropagateEventsTo(Entity) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | PropagateEventsTo(SelectList) | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.
Top
See Also

Reference

SelectList Class


SelectList.PropagateEventsTo Method (DropDown)

SelectListPropagateEventsTo Method (DropDown)
Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void PropagateEventsTo(
    DropDown other
)

Parameters

other
Type: GeonBit.UI.EntitiesDropDown
Entity to propagate events to.
See Also

Reference

SelectList Class
PropagateEventsTo Overload


SelectList.PropagateEventsTo Method (SelectList)

SelectListPropagateEventsTo Method (SelectList)
Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void PropagateEventsTo(
    SelectList other
)

Parameters

other
Type: GeonBit.UI.EntitiesSelectList
Entity to propagate events to.
See Also

Reference

SelectList Class
PropagateEventsTo Overload


SelectList.RemoveItem Method

SelectListRemoveItem Method
Overload List
 | Name | Description
Public method | RemoveItem(Int32) | Remove item from the list, by index.
Public method | RemoveItem(String) | Remove value from the list.
Top
See Also

Reference

SelectList Class


SelectList.RemoveItem Method (Int32)

SelectListRemoveItem Method (Int32)
Remove item from the list, by index.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveItem(
    int index
)

Parameters

index
Type: SystemInt32
Index of the item to remove.
See Also

Reference

SelectList Class
RemoveItem Overload


SelectList.RemoveItem Method (String)

SelectListRemoveItem Method (String)
Remove value from the list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RemoveItem(
    string value
)

Parameters

value
Type: SystemString
Value to remove.
See Also

Reference

SelectList Class
RemoveItem Overload


SelectList.scrollToEnd Method

SelectListscrollToEnd Method
Move scrollbar to last item in list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void scrollToEnd()
See Also

Reference

SelectList Class


SelectList.ScrollToSelected Method

SelectListScrollToSelected Method
Move scrollbar to currently selected item.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ScrollToSelected()
See Also

Reference

SelectList Class


SelectList.Unselect Method

SelectListUnselect Method
Clear current selection.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Unselect()
See Also

Reference

SelectList Class


SelectList Fields

SelectList Fields

The SelectList type exposes the following members.

Fields
 | Name | Description
Public field | AddWhenClipping | String to append when clipping items width.
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AllowReselectValue | If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
Public field | ClipTextIfOverflow | If true and an item in the list is too long for its width, the list will cut its value to fit width.
 | DefaultParagraphStyle | Default styling for select list labels. Note: loaded from UI theme xml file.
 | DefaultSize | Default select list size in pixels.
 | DefaultStyle | Default styling for the select list itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | ExtraSpaceBetweenLines | Extra space (in pixels) between items on Y axis.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | ItemsScale | Scale items in list.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | LockedItems | Optional dictionary of list indexes you want to lock. Every item in this dictionary set to true will be locked and user won't be able to select it.
Public field | LockSelection | When set to true, users cannot change the currently selected value. Note: unlike the basic entity "Locked" that prevent all input from entity and its children, this method of locking will still allow users to scroll through the list, thus making it useable as a read-only list entity.
Public field | MaxItems | If provided, will not be able to add any more of this number of items.
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnListChange | Special callback to execute when list size changes.
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

SelectList Class


SelectList.AddWhenClipping Field

SelectListAddWhenClipping Field
String to append when clipping items width.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string AddWhenClipping

Field Value

Type: String
See Also

Reference

SelectList Class


SelectList.AllowReselectValue Field

SelectListAllowReselectValue Field
If true and user clicks on the item currently selected item, it will still invoke value change event as if a new value was selected.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AllowReselectValue

Field Value

Type: Boolean
See Also

Reference

SelectList Class


SelectList.ClipTextIfOverflow Field

SelectListClipTextIfOverflow Field
If true and an item in the list is too long for its width, the list will cut its value to fit width.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ClipTextIfOverflow

Field Value

Type: Boolean
See Also

Reference

SelectList Class


SelectList.DefaultParagraphStyle Field

SelectListDefaultParagraphStyle Field
Default styling for select list labels. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

SelectList Class


SelectList.DefaultSize Field

SelectListDefaultSize Field
Default select list size in pixels.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

SelectList Class


SelectList.DefaultStyle Field

SelectListDefaultStyle Field
Default styling for the select list itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

SelectList Class


SelectList.ExtraSpaceBetweenLines Field

SelectListExtraSpaceBetweenLines Field
Extra space (in pixels) between items on Y axis.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ExtraSpaceBetweenLines

Field Value

Type: Int32
See Also

Reference

SelectList Class


SelectList.ItemsScale Field

SelectListItemsScale Field
Scale items in list.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float ItemsScale

Field Value

Type: Single
See Also

Reference

SelectList Class


SelectList.LockedItems Field

SelectListLockedItems Field
Optional dictionary of list indexes you want to lock. Every item in this dictionary set to true will be locked and user won't be able to select it.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Dictionary<int, bool> LockedItems

Field Value

Type: Dictionary Int32, Boolean
See Also

Reference

SelectList Class


SelectList.LockSelection Field

SelectListLockSelection Field
When set to true, users cannot change the currently selected value. Note: unlike the basic entity "Locked" that prevent all input from entity and its children, this method of locking will still allow users to scroll through the list, thus making it useable as a read-only list entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool LockSelection

Field Value

Type: Boolean
See Also

Reference

SelectList Class


SelectList.MaxItems Field

SelectListMaxItems Field
If provided, will not be able to add any more of this number of items.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int MaxItems

Field Value

Type: Int32
See Also

Reference

SelectList Class


SelectList.OnListChange Field

SelectListOnListChange Field
Special callback to execute when list size changes.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public EventCallback OnListChange

Field Value

Type: EventCallback
See Also

Reference

SelectList Class


Slider Class

Slider Class
Slider entity looks like a horizontal scrollbar that the user can drag left and right to select a numeric value from range.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesSlider
GeonBit.UI.EntitiesProgressBar
GeonBit.UI.EntitiesVerticalScrollbar

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class Slider : Entity

The Slider type exposes the following members.

Constructors
 | Name | Description
Public method | Slider(UInt32, UInt32, SliderSkin, Anchor, NullableVector2) | Create slider with default size.
Public method | Slider(UInt32, UInt32, Vector2, SliderSkin, Anchor, NullableVector2) | Create the slider.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive).
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range.
Public property | Value | Current slider value.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step.
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max.
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default slider size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the slider itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


Slider Constructor

Slider Constructor
Overload List
 | Name | Description
Public method | Slider(UInt32, UInt32, SliderSkin, Anchor, NullableVector2) | Create slider with default size.
Public method | Slider(UInt32, UInt32, Vector2, SliderSkin, Anchor, NullableVector2) | Create the slider.
Top
See Also

Reference

Slider Class


Slider Constructor (UInt32, UInt32, SliderSkin, Anchor, Nullable(Vector2))

Slider Constructor (UInt32, UInt32, SliderSkin, Anchor, NullableVector2)
Create slider with default size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Slider(
    uint min = 0,
    uint max = 10,
    SliderSkin skin = SliderSkin.Default,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

min (Optional)
Type: SystemUInt32
Min value (inclusive).
max (Optional)
Type: SystemUInt32
Max value (inclusive).
skin (Optional)
Type: GeonBit.UI.EntitiesSliderSkin
Slider skin (texture).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Slider Class
Slider Overload


Slider Constructor (UInt32, UInt32, Vector2, SliderSkin, Anchor, Nullable(Vector2))

Slider Constructor (UInt32, UInt32, Vector2, SliderSkin, Anchor, NullableVector2)
Create the slider.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Slider(
    uint min,
    uint max,
    Vector2 size,
    SliderSkin skin = SliderSkin.Default,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

min
Type: SystemUInt32
Min value (inclusive).
max
Type: SystemUInt32
Max value (inclusive).
size
Type: Vector2
Slider size.
skin (Optional)
Type: GeonBit.UI.EntitiesSliderSkin
Slider skin (texture).
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

Slider Class
Slider Overload


Slider Properties

Slider Properties

The Slider type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive).
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive).
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range.
Public property | Value | Current slider value.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

Slider Class


Slider.Max Property

SliderMax Property
Slider max value (inclusive).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public uint Max { get; set; }

Property Value

Type: UInt32
See Also

Reference

Slider Class


Slider.Min Property

SliderMin Property
Slider min value (inclusive).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public uint Min { get; set; }

Property Value

Type: UInt32
See Also

Reference

Slider Class


Slider.StepsCount Property

SliderStepsCount Property
How many steps (ticks) in slider range.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public uint StepsCount { get; set; }

Property Value

Type: UInt32
See Also

Reference

Slider Class


Slider.Value Property

SliderValue Property
Current slider value.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Value { get; set; }

Property Value

Type: Int32
See Also

Reference

Slider Class


Slider Methods

Slider Methods

The Slider type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step.
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max.
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

Slider Class


Slider.GetStepSize Method

SliderGetStepSize Method
Get the size of a single step.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int GetStepSize()

Return Value

Type: Int32
Size of a single step, eg how much value changes in a step.
See Also

Reference

Slider Class


Slider.GetValueAsPercent Method

SliderGetValueAsPercent Method
Return current value as a percent between min and max.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float GetValueAsPercent()

Return Value

Type: Single
Current value as percent between min and max (0f-1f).
See Also

Reference

Slider Class


Slider.IsNaturallyInteractable Method

SliderIsNaturallyInteractable Method
Is the slider a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

Slider Class


Slider Fields

Slider Fields

The Slider type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default slider size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the slider itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

Slider Class


Slider.DefaultSize Field

SliderDefaultSize Field
Default slider size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

Slider Class


Slider.DefaultStyle Field

SliderDefaultStyle Field
Default styling for the slider itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

Slider Class


SliderSkin Enumeration

SliderSkin Enumeration
Different sliders skins (textures).

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum SliderSkin
Members
Member name | Value | Description
Default | 0 | Default, thin slider skin.
Fancy | 1 | More fancy, thicker slider skin.
See Also

Reference


StyleSheet Class

StyleSheet Class
Set of style properties for different entity states. For example, stylesheet can define that when mouse hover over a paragraph, its text turns red.
Inheritance Hierarchy
SystemObject
System.Collections.GenericDictionary String, StyleProperty
GeonBit.UI.EntitiesStyleSheet

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class StyleSheet : Dictionary<string, StyleProperty>

The StyleSheet type exposes the following members.

Constructors
 | Name | Description
Public method | StyleSheet | Initializes a new instance of the StyleSheet class
Top
Properties
 | Name | Description
Public property | Comparer | (Inherited from Dictionary String, StyleProperty.)
Public property | Count | (Inherited from Dictionary String, StyleProperty.)
Public property | Item | (Inherited from Dictionary String, StyleProperty.)
Public property | Keys | (Inherited from Dictionary String, StyleProperty.)
Public property | Values | (Inherited from Dictionary String, StyleProperty.)
Top
Methods
 | Name | Description
Public method | Add | (Inherited from Dictionary String, StyleProperty.)
Public method | Clear | (Inherited from Dictionary String, StyleProperty.)
Public method | ContainsKey | (Inherited from Dictionary String, StyleProperty.)
Public method | ContainsValue | (Inherited from Dictionary String, StyleProperty.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetEnumerator | (Inherited from Dictionary String, StyleProperty.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | Implements the ISerializable interface and returns the data needed to serialize the DictionaryTKey, TValue instance. (Inherited from Dictionary String, StyleProperty.)
Public method | GetStyleProperty | Return stylesheet property for a given state.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | OnDeserialization | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. (Inherited from Dictionary String, StyleProperty.)
Public method | Remove | (Inherited from Dictionary String, StyleProperty.)
Public method | SetStyleProperty | Set a stylesheet property.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | TryGetValue | (Inherited from Dictionary String, StyleProperty.)
Public method | UpdateFrom | Update the entire stylesheet from a different stylesheet.
Top
See Also

Reference


StyleSheet Constructor

StyleSheet Constructor
Initializes a new instance of the StyleSheet class

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public StyleSheet()
See Also

Reference

StyleSheet Class


StyleSheet Properties

StyleSheet Properties

The StyleSheet type exposes the following members.

Properties
 | Name | Description
Public property | Comparer | (Inherited from Dictionary String, StyleProperty.)
Public property | Count | (Inherited from Dictionary String, StyleProperty.)
Public property | Item | (Inherited from Dictionary String, StyleProperty.)
Public property | Keys | (Inherited from Dictionary String, StyleProperty.)
Public property | Values | (Inherited from Dictionary String, StyleProperty.)
Top
See Also

Reference

StyleSheet Class


StyleSheet Methods

StyleSheet Methods

The StyleSheet type exposes the following members.

Methods
 | Name | Description
Public method | Add | (Inherited from Dictionary String, StyleProperty.)
Public method | Clear | (Inherited from Dictionary String, StyleProperty.)
Public method | ContainsKey | (Inherited from Dictionary String, StyleProperty.)
Public method | ContainsValue | (Inherited from Dictionary String, StyleProperty.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetEnumerator | (Inherited from Dictionary String, StyleProperty.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | Implements the ISerializable interface and returns the data needed to serialize the DictionaryTKey, TValue instance. (Inherited from Dictionary String, StyleProperty.)
Public method | GetStyleProperty | Return stylesheet property for a given state.
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | OnDeserialization | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. (Inherited from Dictionary String, StyleProperty.)
Public method | Remove | (Inherited from Dictionary String, StyleProperty.)
Public method | SetStyleProperty | Set a stylesheet property.
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | TryGetValue | (Inherited from Dictionary String, StyleProperty.)
Public method | UpdateFrom | Update the entire stylesheet from a different stylesheet.
Top
See Also

Reference

StyleSheet Class


StyleSheet.GetStyleProperty Method

StyleSheetGetStyleProperty Method
Return stylesheet property for a given state.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public StyleProperty GetStyleProperty(
    string property,
    EntityState state = EntityState.Default,
    bool fallbackToDefault = true
)

Parameters

property
Type: SystemString
Property identifier.
state (Optional)
Type: GeonBit.UI.EntitiesEntityState
State to get property for (if undefined will fallback to default state).
fallbackToDefault (Optional)
Type: SystemBoolean
If true and property not found for given state, will fallback to default state.

Return Value

Type: StyleProperty
Style property value for given state or default, or null if undefined.
See Also

Reference

StyleSheet Class


StyleSheet.SetStyleProperty Method

StyleSheetSetStyleProperty Method
Set a stylesheet property.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void SetStyleProperty(
    string property,
    StyleProperty value,
    EntityState state = EntityState.Default
)

Parameters

property
Type: SystemString
Property identifier.
value
Type: StyleProperty
Property value.
state (Optional)
Type: GeonBit.UI.EntitiesEntityState
State to set property for.
See Also

Reference

StyleSheet Class


StyleSheet.UpdateFrom Method

StyleSheetUpdateFrom Method
Update the entire stylesheet from a different stylesheet.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void UpdateFrom(
    StyleSheet other
)

Parameters

other
Type: GeonBit.UI.EntitiesStyleSheet
Other StyleSheet to update from.
See Also

Reference

StyleSheet Class


TextInput Class

TextInput Class
A textbox that allow users to put in free text.
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesPanel
GeonBit.UI.EntitiesTextInput

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TextInput : Panel

The TextInput type exposes the following members.

Constructors
 | Name | Description
Public method | TextInput(Boolean, Anchor, NullableVector2) | Create the text input with default size.
Public method | TextInput(Boolean, Vector2, Anchor, NullableVector2, PanelSkin) | Create the text input.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Caret | Current cursor, eg where we are about to put next character. Set to -1 to jump to end.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | PlaceholderText | Text to show when there's no input using the placeholder style.
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ScrollPosition | Current scrollbar position.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Value | Current input text value.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the text input a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | ResetCaret | Move caret to the end of text.
Public method | ScrollToCaret | Move scrollbar to show caret position.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
 | CaretBlinkingSpeed | How fast to blink caret when text input is selected.
Public field | CharactersLimit | Set to any number to limit input by characters count.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default style for paragraph that show current value.
 | DefaultPlaceholderStyle | Default style for the placeholder paragraph.
 | DefaultSize | Default text-input size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the text input itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | HideInputWithChar | If provided, hide input and replace it with the given character. This is useful for stuff like password input field.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitBySize | If true, will limit max input length to fit textbox size.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PlaceholderParagraph | A placeholder paragraph to show when text input is empty.
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | The Paragraph object showing current text value.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | Validators | List of validators to apply on text input.
Public field | ValueWhenEmpty | If provided, will automatically put this value whenever the user leave the input box and its empty.
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


TextInput Constructor

TextInput Constructor
Overload List
 | Name | Description
Public method | TextInput(Boolean, Anchor, NullableVector2) | Create the text input with default size.
Public method | TextInput(Boolean, Vector2, Anchor, NullableVector2, PanelSkin) | Create the text input.
Top
See Also

Reference

TextInput Class


TextInput Constructor (Boolean, Anchor, Nullable(Vector2))

TextInput Constructor (Boolean, Anchor, NullableVector2)
Create the text input with default size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TextInput(
    bool multiline,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null
)

Parameters

multiline
Type: SystemBoolean
If true, text input will accept multiple lines.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
See Also

Reference

TextInput Class
TextInput Overload


TextInput Constructor (Boolean, Vector2, Anchor, Nullable(Vector2), PanelSkin)

TextInput Constructor (Boolean, Vector2, Anchor, NullableVector2, PanelSkin)
Create the text input.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TextInput(
    bool multiline,
    Vector2 size,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null,
    PanelSkin skin = PanelSkin.ListBackground
)

Parameters

multiline
Type: SystemBoolean
If true, text input will accept multiple lines.
size
Type: Vector2
Input box size.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
skin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
TextInput skin, eg which texture to use.
See Also

Reference

TextInput Class
TextInput Overload


TextInput Properties

TextInput Properties

The TextInput type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Caret | Current cursor, eg where we are about to put next character. Set to -1 to jump to end.
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | PanelOverflowBehavior | Set / get panel overflow behavior. Note: some modes require Render Targets, eg setting the 'UseRenderTarget' to true. (Inherited from Panel.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | PlaceholderText | Text to show when there's no input using the placeholder style.
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | Scrollbar | Get the scrollbar of this panel. (Inherited from Panel.)
Public property | ScrollPosition | Current scrollbar position.
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | Skin | Set / get current panel skin. (Inherited from Panel.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | Value | Current input text value.
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

TextInput Class


TextInput.Caret Property

TextInputCaret Property
Current cursor, eg where we are about to put next character. Set to -1 to jump to end.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Caret { get; set; }

Property Value

Type: Int32
See Also

Reference

TextInput Class


TextInput.PlaceholderText Property

TextInputPlaceholderText Property
Text to show when there's no input using the placeholder style.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string PlaceholderText { get; set; }

Property Value

Type: String
See Also

Reference

TextInput Class


TextInput.ScrollPosition Property

TextInputScrollPosition Property
Current scrollbar position.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int ScrollPosition { get; set; }

Property Value

Type: Int32
See Also

Reference

TextInput Class


TextInput.Value Property

TextInputValue Property
Current input text value.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string Value { get; set; }

Property Value

Type: String
See Also

Reference

TextInput Class


TextInput Methods

TextInput Methods

The TextInput type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Panel.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Dispose | Dispose unmanaged resources related to this panel (render target). (Inherited from Panel.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the text input a natrually-interactable entity. (Overrides EntityIsNaturallyInteractable.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | ResetCaret | Move caret to the end of text.
Public method | ScrollToCaret | Move scrollbar to show caret position.
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

TextInput Class


TextInput.IsNaturallyInteractable Method

TextInputIsNaturallyInteractable Method
Is the text input a natrually-interactable entity.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool IsNaturallyInteractable()

Return Value

Type: Boolean
True.
See Also

Reference

TextInput Class


TextInput.ResetCaret Method

TextInputResetCaret Method
Move caret to the end of text.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ResetCaret(
    bool scrollToCaret
)

Parameters

scrollToCaret
Type: SystemBoolean
If true, will also scroll to show caret position.
See Also

Reference

TextInput Class


TextInput.ScrollToCaret Method

TextInputScrollToCaret Method
Move scrollbar to show caret position.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ScrollToCaret()
See Also

Reference

TextInput Class


TextInput Fields

TextInput Fields

The TextInput type exposes the following members.

Fields
 | Name | Description
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
 | CaretBlinkingSpeed | How fast to blink caret when text input is selected.
Public field | CharactersLimit | Set to any number to limit input by characters count.
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultParagraphStyle | Default style for paragraph that show current value.
 | DefaultPlaceholderStyle | Default style for the placeholder paragraph.
 | DefaultSize | Default text-input size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for the text input itself. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | HideInputWithChar | If provided, hide input and replace it with the given character. This is useful for stuff like password input field.
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitBySize | If true, will limit max input length to fit textbox size.
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PlaceholderParagraph | A placeholder paragraph to show when text input is empty.
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | TextParagraph | The Paragraph object showing current text value.
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | Validators | List of validators to apply on text input.
Public field | ValueWhenEmpty | If provided, will automatically put this value whenever the user leave the input box and its empty.
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

TextInput Class


TextInput.CaretBlinkingSpeed Field

TextInputCaretBlinkingSpeed Field
How fast to blink caret when text input is selected.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float CaretBlinkingSpeed

Field Value

Type: Single
See Also

Reference

TextInput Class


TextInput.CharactersLimit Field

TextInputCharactersLimit Field
Set to any number to limit input by characters count.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int CharactersLimit

Field Value

Type: Int32
See Also

Reference

TextInput Class


TextInput.DefaultParagraphStyle Field

TextInputDefaultParagraphStyle Field
Default style for paragraph that show current value.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultParagraphStyle

Field Value

Type: StyleSheet
See Also

Reference

TextInput Class


TextInput.DefaultPlaceholderStyle Field

TextInputDefaultPlaceholderStyle Field
Default style for the placeholder paragraph.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultPlaceholderStyle

Field Value

Type: StyleSheet
See Also

Reference

TextInput Class


TextInput.DefaultSize Field

TextInputDefaultSize Field
Default text-input size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

TextInput Class


TextInput.DefaultStyle Field

TextInputDefaultStyle Field
Default styling for the text input itself. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

TextInput Class


TextInput.HideInputWithChar Field

TextInputHideInputWithChar Field
If provided, hide input and replace it with the given character. This is useful for stuff like password input field.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Nullable<char> HideInputWithChar

Field Value

Type: Nullable Char
See Also

Reference

TextInput Class


TextInput.LimitBySize Field

TextInputLimitBySize Field
If true, will limit max input length to fit textbox size.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool LimitBySize

Field Value

Type: Boolean
See Also

Reference

TextInput Class


TextInput.PlaceholderParagraph Field

TextInputPlaceholderParagraph Field
A placeholder paragraph to show when text input is empty.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph PlaceholderParagraph

Field Value

Type: Paragraph
See Also

Reference

TextInput Class


TextInput.TextParagraph Field

TextInputTextParagraph Field
The Paragraph object showing current text value.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Paragraph TextParagraph

Field Value

Type: Paragraph
See Also

Reference

TextInput Class


TextInput.Validators Field

TextInputValidators Field
List of validators to apply on text input.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public List<ITextValidator> Validators

Field Value

Type: List ITextValidator
See Also

Reference

TextInput Class


TextInput.ValueWhenEmpty Field

TextInputValueWhenEmpty Field
If provided, will automatically put this value whenever the user leave the input box and its empty.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string ValueWhenEmpty

Field Value

Type: String
See Also

Reference

TextInput Class


VerticalScrollbar Class

VerticalScrollbar Class
Used internally as a scrollbar for lists, text boxes, etc..
Inheritance Hierarchy
SystemObject
GeonBit.UI.EntitiesEntity
GeonBit.UI.EntitiesSlider
GeonBit.UI.EntitiesVerticalScrollbar

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class VerticalScrollbar : Slider

The VerticalScrollbar type exposes the following members.

Constructors
 | Name | Description
Public method | VerticalScrollbar | Create the scrollbar.
Top
Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive). (Inherited from Slider.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive). (Inherited from Slider.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range. (Inherited from Slider.)
Public property | Value | Current slider value. (Inherited from Slider.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step. (Inherited from Slider.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max. (Inherited from Slider.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Inherited from Slider.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
Fields
 | Name | Description
Public field | AdjustMaxAutomatically | If true, will adjust max value automatically based on entities in parent.
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default scrollbar size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for vertical scrollbars. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference


VerticalScrollbar Constructor

VerticalScrollbar Constructor
Create the scrollbar.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public VerticalScrollbar(
    uint min,
    uint max,
    Anchor anchor = Anchor.Auto,
    Nullable<Vector2> offset = null,
    bool adjustMaxAutomatically = false
)

Parameters

min
Type: SystemUInt32
Min scrollbar value.
max
Type: SystemUInt32
Max scrollbar value.
anchor (Optional)
Type: GeonBit.UI.EntitiesAnchor
Position anchor.
offset (Optional)
Type: SystemNullable Vector2
Offset from anchor position.
adjustMaxAutomatically (Optional)
Type: SystemBoolean
If true, the scrollbar will set its max value automatically based on entities in its parent.
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar Properties

VerticalScrollbar Properties

The VerticalScrollbar type exposes the following members.

Properties
 | Name | Description
Public property | Background | Optional background entity that will not respond to events and will always be rendered right behind this entity. (Inherited from Entity.)
Public property | Draggable | Is the entity draggable (eg can a user grab it and drag it around). (Inherited from Entity.)
Public property | EntityDefaultSize | Return the default size for this entity. (Inherited from Entity.)
Public property | FillColor | Entity fill color - this is just a sugarcoat to access the default fill color style property. (Inherited from Entity.)
Public property | InternalDestRect | Get internal destination rect. (Inherited from Entity.)
Public property | IsDirty | Get if this entity needs to recalculate destination rect. (Inherited from Entity.)
Public property | IsFocused | Does this entity or one of its children currently focused? (Inherited from Entity.)
Public property | IsMouseDown | Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down). (Inherited from Entity.)
Public property | IsMouseOver | Return if the mouse is currently over this entity (regardless of weather or not mouse button is down). (Inherited from Entity.)
Public property | Max | Slider max value (inclusive). (Inherited from Slider.)
Public property | MaxSize | If defined, will limit the maximum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be more than 200 pixels width. (Inherited from Entity.)
Public property | Min | Slider min value (inclusive). (Inherited from Slider.)
Public property | MinSize | If defined, will limit the minimum size of this entity when calculating size. This is especially useful for entities with size that depends on their parent entity size, for example if you define an entity to take 20% of its parent space but can't be less than 200 pixels width. (Inherited from Entity.)
Public property | Opacity | Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property. (Inherited from Entity.)
Public property | OutlineColor | Entity outline color - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | OutlineOpacity | Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property. (Inherited from Entity.)
Public property | OutlineWidth | Entity outline width - this is just a sugarcoat to access the default outline color style property. (Inherited from Entity.)
Public property | Padding | Entity padding - this is just a sugarcoat to access the default padding style property. (Inherited from Entity.)
Public property | Parent | Get the direct parent of this entity. (Inherited from Entity.)
Public property | Priority | Return entity priority in drawing order and event handling. (Inherited from Entity.)
Public property | Scale | Entity scale - this is just a sugarcoat to access the default scale style property. (Inherited from Entity.)
Public property | ShadowColor | Entity shadow color - this is just a sugarcoat to access the default shadow color style property. (Inherited from Entity.)
Public property | ShadowOffset | Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property. (Inherited from Entity.)
Public property | ShadowScale | Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property. (Inherited from Entity.)
Public property | Size | Entity current size property. (Inherited from Entity.)
Public property | SpaceAfter | Extra space (in pixels) to reserve *after* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | SpaceBefore | Extra space (in pixels) to reserve *before* this entity when using Auto Anchors. (Inherited from Entity.)
Public property | State | Current entity state (default / mouse hover / mouse down..). (Inherited from Entity.)
Public property | StepsCount | How many steps (ticks) in slider range. (Inherited from Slider.)
Public property | Value | Current slider value. (Inherited from Slider.)
Public property | Visible | Set / get visibility. (Inherited from Entity.)
Top
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar Methods

VerticalScrollbar Methods

The VerticalScrollbar type exposes the following members.

Methods
 | Name | Description
Public method | AddChild | Add a child entity. (Inherited from Entity.)
Public method | BringToFront | Bring this entity to be on front (inside its parent). (Inherited from Entity.)
Public method | CalcDestRect | Calculate and return the destination rectangle, eg the space this entity is rendered on. (Inherited from Entity.)
Public method | CalcInternalRect | Calculate and return the internal destination rectangle (note: this relay on the dest rect having a valid value first). (Inherited from Entity.)
Public method | ClearChildren | Remove all children entities. (Inherited from Entity.)
Public method | Draw | Draw this entity and its children. (Inherited from Entity.)
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | FindT(String, Boolean) | Find and return first occurance of a child entity with a given identifier and specific type. (Inherited from Entity.)
Public method | GetActiveStyle | Return stylesheet property for current entity state (or default if undefined for state). (Inherited from Entity.)
Public method | GetActualDestRect | Return actual destination rectangle. This can be override and implemented by things like Paragraph, where the actual destination rect is based on text content, font and word-wrap. (Inherited from Entity.)
Public method | GetChildren | Return all children of this entity. (Inherited from Entity.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetRelativeOffset | Return the relative offset, in pixels, from parent top-left corner. (Inherited from Entity.)
Public method | GetStepSize | Get the size of a single step. (Inherited from Slider.)
Public method | GetStyleProperty | Return stylesheet property for a given state. (Inherited from Entity.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | GetValueAsPercent | Return current value as a percent between min and max. (Inherited from Slider.)
Public method | IsDeepChildOf | Check if this entity is a descendant of another entity. This goes up all the way to root. (Inherited from Entity.)
Public method | IsDisabled | Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled. (Inherited from Entity.)
Public method | IsInsideEntity | Test if a given point is inside entity's boundaries. (Inherited from Entity.)
Public method | IsLocked | Return if this entity is currently locked, due to self or one of the parents / grandparents being locked. (Inherited from Entity.)
Public method | IsNaturallyInteractable | Is the slider a natrually-interactable entity. (Inherited from Slider.)
Public method | IsVisible | Return if this entity is currently visible, eg this and all its parents and grandparents are visible. (Inherited from Entity.)
Public method | IterateChildren | Iterate over children and call 'callback' for every direct child of this entity. (Inherited from Entity.)
Public method | MarkAsDirty | Mark that this entity boundaries or style changed and it need to recalculate cached destination rect and other things. (Inherited from Entity.)
Public method | PropagateEventsTo | Propagate all events trigger by this entity to a given other entity. For example, if "OnClick" will be called on this entity, it will trigger OnClick on 'other' as well. (Inherited from Entity.)
Public method | RemoveChild | Remove child entity. (Inherited from Entity.)
Public method | RemoveFromParent | Remove this entity from its parent. (Inherited from Entity.)
Public method | SetAnchor | Set the anchor of this entity. (Inherited from Entity.)
Public method | SetOffset | Set the offset of this entity. (Inherited from Entity.)
Public method | SetPosition | Set the position and anchor of this entity. (Inherited from Entity.)
Public method | SetStyleProperty | Set a stylesheet property. (Inherited from Entity.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | Update | Called every frame to update entity state and call events. (Inherited from Entity.)
Public method | UpdateDestinationRects | Update dest rect and internal dest rect. This is called internally whenever a change is made to the entity or its parent. (Inherited from Entity.)
Public method | UpdateDestinationRectsIfDirty | Update dest rect and internal dest rect, but only if needed (eg if something changed since last update). (Inherited from Entity.)
Public method | UpdateStyle | Update the entire stylesheet from a different stylesheet. (Inherited from Entity.)
Top
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar Fields

VerticalScrollbar Fields

The VerticalScrollbar type exposes the following members.

Fields
 | Name | Description
Public field | AdjustMaxAutomatically | If true, will adjust max value automatically based on entities in parent.
Public field | AfterDraw | Callback to execute every frame after this entity is rendered. (Inherited from Entity.)
Public field | AfterUpdate | Callback to execute every frame after this entity updates. (Inherited from Entity.)
Public field | AttachedData | Optional data you can attach to this entity and retrieve later (for example when handling events). (Inherited from Entity.)
Public field | BeforeDraw | Callback to execute every frame before this entity is rendered. (Inherited from Entity.)
Public field | BeforeUpdate | Callback to execute every frame before this entity updates. (Inherited from Entity.)
Public field | ClickThrough | If this boolean is true, events will just "go through" this entity to its children or entities behind it. This bool comes to solve conditions where you have two panels without skin that hide each other but you want users to be able to click on the bottom panel through the upper panel, provided it doesn't hit any of the first panel's children. (Inherited from Entity.)
 | DefaultSize | Default scrollbar size for when no size is provided or when -1 is set for either width or height.
 | DefaultStyle | Default styling for vertical scrollbars. Note: loaded from UI theme xml file.
Public field | Disabled | If true, this entity and its children will be drawn in greyscale effect and will not respond to events. (Inherited from Entity.)
Public field | ExtraMargin | Adds extra space outside the dest rect for collision detection. In other words, if extra margin is set to 10 and the user points with its mouse 5 pixels above this entity, it would still think the user points on the entity. (Inherited from Entity.)
Public field | Identifier | Optional identifier you can attach to entities so you can later search and retrieve by. (Inherited from Entity.)
Public field | LimitDraggingToParentBoundaries | If true, users will not be able to drag this entity outside its parent boundaries. (Inherited from Entity.)
Public field | Locked | If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled). (Inherited from Entity.)
Public field | OnClick | Callback to execute when user clicks on this entity (eg release mouse over it). (Inherited from Entity.)
Public field | OnFocusChange | Callback to execute every time this entity focus / unfocus. (Inherited from Entity.)
Public field | OnMouseDown | Callback to execute when mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnMouseEnter | Callback to execute when mouse start hovering over this entity (eg enters its region). (Inherited from Entity.)
Public field | OnMouseLeave | Callback to execute when mouse stop hovering over this entity (eg leaves its region). (Inherited from Entity.)
Public field | OnMouseReleased | Callback to execute when mouse button is released over this entity (called once when button is released). (Inherited from Entity.)
Public field | OnMouseWheelScroll | Callback to execute when mouse wheel scrolls and this entity is the active entity. (Inherited from Entity.)
Public field | OnRightClick | Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it). (Inherited from Entity.)
Public field | OnRightMouseDown | Callback to execute when right mouse button is pressed over this entity (called once when button is pressed). (Inherited from Entity.)
Public field | OnStartDrag | Called when entity starts getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnStopDrag | Called when entity stop getting dragged (only if draggable). (Inherited from Entity.)
Public field | OnValueChange | Callback to execute when entity value changes (relevant only for entities with value). (Inherited from Entity.)
Public field | OnVisiblityChange | Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again). (Inherited from Entity.)
Public field | PromiscuousClicksMode | If in promiscuous mode, mouse button is pressed *outside* the entity and then released on the entity, click event will be fired. If false, in order to fire click event the mouse button must be pressed AND released over this entity (but can travel outside while being held down, as long as its released inside). Note: Windows default behavior is non promiscuous mode. (Inherited from Entity.)
Public field | ToolTipText | Optional tooltip text to show if the user points on this entity for long enough. (Inherited from Entity.)
Public field | UseActualSizeForCollision | If true (default), will use the actual object size for collision detection. If false, will use the size property. This is useful for paragraphs, for example, where the actual width is based on text content and can vary and be totally different than the size set in the constructor. (Inherited from Entity.)
Public field | WhileDragging | Called every frame while the entity is being dragged. (Inherited from Entity.)
Public field | WhileMouseDown | Callback to execute every frame while mouse button is pressed over the entity. (Inherited from Entity.)
Public field | WhileMouseHover | Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down). (Inherited from Entity.)
Public field | WhileMouseHoverOrDown | Callback to execute every frame while mouse is hovering over the entity, even if mouse is down. (Inherited from Entity.)
Public field | WhileRightMouseDown | Callback to execute every frame while right mouse button is pressed over the entity. (Inherited from Entity.)
Top
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar.AdjustMaxAutomatically Field

VerticalScrollbarAdjustMaxAutomatically Field
If true, will adjust max value automatically based on entities in parent.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool AdjustMaxAutomatically

Field Value

Type: Boolean
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar.DefaultSize Field

VerticalScrollbarDefaultSize Field
Default scrollbar size for when no size is provided or when -1 is set for either width or height.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultSize

Field Value

Type: Vector2
See Also

Reference

VerticalScrollbar Class


VerticalScrollbar.DefaultStyle Field

VerticalScrollbarDefaultStyle Field
Default styling for vertical scrollbars. Note: loaded from UI theme xml file.

Namespace: GeonBit.UI.Entities
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static StyleSheet DefaultStyle

Field Value

Type: StyleSheet
See Also

Reference

VerticalScrollbar Class


GeonBit.UI.Entities.TextValidators Namespace

GeonBit.UI.Entities.TextValidators Namespace
GeonBit.UI.Entities.TextValidators contains different text validators and processors you can attach to TextInput entities.
Classes
 | Class | Description
Public class | OnlySingleSpaces | Make sure input don't contain double spaces or tabs.
Public class | SlugValidator | Make sure input contains only letters, numbers, underscores or hyphens (and optionally spaces).
Public class | TextValidatorEnglishCharsOnly | Make sure input contains only english characters.
Public class | TextValidatorMakeTitle | Make sure input is always title, eg starts with a capital letter followed by lowercase.
Public class | TextValidatorNumbersOnly | Make sure input is numeric and optionally validate min / max values.
Interfaces
 | Interface | Description
Public interface | ITextValidator | A class that validates text input to make sure its valid. These classes can be added to any TextInput to limit the type of input the user can enter.


ITextValidator Interface

ITextValidator Interface
A class that validates text input to make sure its valid. These classes can be added to any TextInput to limit the type of input the user can enter.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public interface ITextValidator

The ITextValidator type exposes the following members.

Methods
 | Name | Description
Public method | ValidateText | Get the new text input value and return true if valid. This function can either return false to scrap input changes, or change the text and return true.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


ITextValidator Methods

ITextValidator Methods

The ITextValidator type exposes the following members.

Methods
 | Name | Description
Public method | ValidateText | Get the new text input value and return true if valid. This function can either return false to scrap input changes, or change the text and return true.
Top
See Also

Reference

ITextValidator Interface
GeonBit.UI.Entities.TextValidators Namespace


ITextValidator.ValidateText Method

ITextValidatorValidateText Method
Get the new text input value and return true if valid. This function can either return false to scrap input changes, or change the text and return true.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
If TextInput value is legal.
See Also

Reference

ITextValidator Interface
GeonBit.UI.Entities.TextValidators Namespace


OnlySingleSpaces Class

OnlySingleSpaces Class
Make sure input don't contain double spaces or tabs.
Inheritance Hierarchy
SystemObject
GeonBit.UI.Entities.TextValidatorsOnlySingleSpaces

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class OnlySingleSpaces : ITextValidator

The OnlySingleSpaces type exposes the following members.

Constructors
 | Name | Description
Public method | OnlySingleSpaces | Initializes a new instance of the OnlySingleSpaces class
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input don't contain double spaces or tabs.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


OnlySingleSpaces Constructor

OnlySingleSpaces Constructor
Initializes a new instance of the OnlySingleSpaces class

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public OnlySingleSpaces()
See Also

Reference

OnlySingleSpaces Class
GeonBit.UI.Entities.TextValidators Namespace


OnlySingleSpaces Methods

OnlySingleSpaces Methods

The OnlySingleSpaces type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input don't contain double spaces or tabs.
Top
See Also

Reference

OnlySingleSpaces Class
GeonBit.UI.Entities.TextValidators Namespace


OnlySingleSpaces.ValidateText Method

OnlySingleSpacesValidateText Method
Return true if text input don't contain double spaces or tabs.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
If TextInput value is legal.

Implements

ITextValidatorValidateText(String, String)
See Also

Reference

OnlySingleSpaces Class
GeonBit.UI.Entities.TextValidators Namespace


SlugValidator Class

SlugValidator Class
Make sure input contains only letters, numbers, underscores or hyphens (and optionally spaces).
Inheritance Hierarchy
SystemObject
GeonBit.UI.Entities.TextValidatorsSlugValidator

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class SlugValidator : ITextValidator

The SlugValidator type exposes the following members.

Constructors
 | Name | Description
Public method | SlugValidator | Create the slug validator.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is slug.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


SlugValidator Constructor

SlugValidator Constructor
Create the slug validator.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public SlugValidator(
    bool allowSpaces = false
)

Parameters

allowSpaces (Optional)
Type: SystemBoolean
If true, will allow spaces.
See Also

Reference

SlugValidator Class
GeonBit.UI.Entities.TextValidators Namespace


SlugValidator Methods

SlugValidator Methods

The SlugValidator type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is slug.
Top
See Also

Reference

SlugValidator Class
GeonBit.UI.Entities.TextValidators Namespace


SlugValidator.ValidateText Method

SlugValidatorValidateText Method
Return true if text input is slug.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
If TextInput value is legal.

Implements

ITextValidatorValidateText(String, String)
See Also

Reference

SlugValidator Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorEnglishCharsOnly Class

TextValidatorEnglishCharsOnly Class
Make sure input contains only english characters.
Inheritance Hierarchy
SystemObject
GeonBit.UI.Entities.TextValidatorsTextValidatorEnglishCharsOnly

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TextValidatorEnglishCharsOnly : ITextValidator

The TextValidatorEnglishCharsOnly type exposes the following members.

Constructors
 | Name | Description
Public method | TextValidatorEnglishCharsOnly | Create the validator.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is only english characters.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


TextValidatorEnglishCharsOnly Constructor

TextValidatorEnglishCharsOnly Constructor
Create the validator.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TextValidatorEnglishCharsOnly(
    bool allowSpaces = false
)

Parameters

allowSpaces (Optional)
Type: SystemBoolean
If true, will allow spaces.
See Also

Reference

TextValidatorEnglishCharsOnly Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorEnglishCharsOnly Methods

TextValidatorEnglishCharsOnly Methods

The TextValidatorEnglishCharsOnly type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is only english characters.
Top
See Also

Reference

TextValidatorEnglishCharsOnly Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorEnglishCharsOnly.ValidateText Method

TextValidatorEnglishCharsOnlyValidateText Method
Return true if text input is only english characters.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
If TextInput value is legal.

Implements

ITextValidatorValidateText(String, String)
See Also

Reference

TextValidatorEnglishCharsOnly Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorMakeTitle Class

TextValidatorMakeTitle Class
Make sure input is always title, eg starts with a capital letter followed by lowercase.
Inheritance Hierarchy
SystemObject
GeonBit.UI.Entities.TextValidatorsTextValidatorMakeTitle

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TextValidatorMakeTitle : ITextValidator

The TextValidatorMakeTitle type exposes the following members.

Constructors
 | Name | Description
Public method | TextValidatorMakeTitle | Initializes a new instance of the TextValidatorMakeTitle class
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Always return true, and make first character uppercase while all following chars lowercase.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


TextValidatorMakeTitle Constructor

TextValidatorMakeTitle Constructor
Initializes a new instance of the TextValidatorMakeTitle class

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TextValidatorMakeTitle()
See Also

Reference

TextValidatorMakeTitle Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorMakeTitle Methods

TextValidatorMakeTitle Methods

The TextValidatorMakeTitle type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Always return true, and make first character uppercase while all following chars lowercase.
Top
See Also

Reference

TextValidatorMakeTitle Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorMakeTitle.ValidateText Method

TextValidatorMakeTitleValidateText Method
Always return true, and make first character uppercase while all following chars lowercase.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
Always return true.

Implements

ITextValidatorValidateText(String, String)
See Also

Reference

TextValidatorMakeTitle Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorNumbersOnly Class

TextValidatorNumbersOnly Class
Make sure input is numeric and optionally validate min / max values.
Inheritance Hierarchy
SystemObject
GeonBit.UI.Entities.TextValidatorsTextValidatorNumbersOnly

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class TextValidatorNumbersOnly : ITextValidator

The TextValidatorNumbersOnly type exposes the following members.

Constructors
 | Name | Description
Public method | TextValidatorNumbersOnly | Create the number validator.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is a valid number.
Top
See Also

Reference

GeonBit.UI.Entities.TextValidators Namespace


TextValidatorNumbersOnly Constructor

TextValidatorNumbersOnly Constructor
Create the number validator.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public TextValidatorNumbersOnly(
    bool allowDecimal = false,
    Nullable<double> min = null,
    Nullable<double> max = null
)

Parameters

allowDecimal (Optional)
Type: SystemBoolean
If true, will allow decimal point in input.
min (Optional)
Type: SystemNullable Double
If provided, will force min value.
max (Optional)
Type: SystemNullable Double
If provided, will force max value.
See Also

Reference

TextValidatorNumbersOnly Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorNumbersOnly Methods

TextValidatorNumbersOnly Methods

The TextValidatorNumbersOnly type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Public method | ValidateText | Return true if text input is a valid number.
Top
See Also

Reference

TextValidatorNumbersOnly Class
GeonBit.UI.Entities.TextValidators Namespace


TextValidatorNumbersOnly.ValidateText Method

TextValidatorNumbersOnlyValidateText Method
Return true if text input is a valid number.

Namespace: GeonBit.UI.Entities.TextValidators
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ValidateText(
    ref string text,
    string oldText
)

Parameters

text
Type: SystemString
New text input value.
oldText
Type: SystemString
Previous text input value.

Return Value

Type: Boolean
If TextInput value is legal.

Implements

ITextValidatorValidateText(String, String)
See Also

Reference

TextValidatorNumbersOnly Class
GeonBit.UI.Entities.TextValidators Namespace


GeonBit.UI.Exceptions Namespace

GeonBit.UI.Exceptions Namespace

[Missing <summary> documentation for "N:GeonBit.UI.Exceptions"]

Classes
 | Class | Description
Public class | InvalidStateException | Thrown when the user tries to perform an action but the object / UI state does not allow it.
Public class | InvalidValueException | Thrown when the user provides an invalid value.
Public class | NotFoundException | Thrown when something is not found (key, value, index, etc.)


InvalidStateException Class

InvalidStateException Class
Thrown when the user tries to perform an action but the object / UI state does not allow it.
Inheritance Hierarchy
SystemObject
SystemException
GeonBit.UI.ExceptionsInvalidStateException

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class InvalidStateException : Exception

The InvalidStateException type exposes the following members.

Constructors
 | Name | Description
Public method | InvalidStateException | Create the exception without message.
Public method | InvalidStateException(String) | Create the exception with message.
Public method | InvalidStateException(String, Exception) | Create the exception with message and inner exception.
Top
Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

GeonBit.UI.Exceptions Namespace


InvalidStateException Constructor

InvalidStateException Constructor
Overload List
 | Name | Description
Public method | InvalidStateException | Create the exception without message.
Public method | InvalidStateException(String) | Create the exception with message.
Public method | InvalidStateException(String, Exception) | Create the exception with message and inner exception.
Top
See Also

Reference

InvalidStateException Class
GeonBit.UI.Exceptions Namespace


InvalidStateException Constructor

InvalidStateException Constructor
Create the exception without message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidStateException()
See Also

Reference

InvalidStateException Class
InvalidStateException Overload
GeonBit.UI.Exceptions Namespace


InvalidStateException Constructor (String)

InvalidStateException Constructor (String)
Create the exception with message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidStateException(
    string message
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.InvalidStateException.#ctor(System.String)"]

See Also

Reference

InvalidStateException Class
InvalidStateException Overload
GeonBit.UI.Exceptions Namespace


InvalidStateException Constructor (String, Exception)

InvalidStateException Constructor (String, Exception)
Create the exception with message and inner exception.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidStateException(
    string message,
    Exception inner
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.InvalidStateException.#ctor(System.String,System.Exception)"]

inner
Type: SystemException

[Missing <param name="inner"/> documentation for "M:GeonBit.UI.Exceptions.InvalidStateException.#ctor(System.String,System.Exception)"]

See Also

Reference

InvalidStateException Class
InvalidStateException Overload
GeonBit.UI.Exceptions Namespace


InvalidStateException Properties

InvalidStateException Properties

The InvalidStateException type exposes the following members.

Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
See Also

Reference

InvalidStateException Class
GeonBit.UI.Exceptions Namespace


InvalidStateException Methods

InvalidStateException Methods

The InvalidStateException type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

InvalidStateException Class
GeonBit.UI.Exceptions Namespace


InvalidValueException Class

InvalidValueException Class
Thrown when the user provides an invalid value.
Inheritance Hierarchy
SystemObject
SystemException
GeonBit.UI.ExceptionsInvalidValueException

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class InvalidValueException : Exception

The InvalidValueException type exposes the following members.

Constructors
 | Name | Description
Public method | InvalidValueException | Create the exception without message.
Public method | InvalidValueException(String) | Create the exception with message.
Public method | InvalidValueException(String, Exception) | Create the exception with message and inner exception.
Top
Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

GeonBit.UI.Exceptions Namespace


InvalidValueException Constructor

InvalidValueException Constructor
Overload List
 | Name | Description
Public method | InvalidValueException | Create the exception without message.
Public method | InvalidValueException(String) | Create the exception with message.
Public method | InvalidValueException(String, Exception) | Create the exception with message and inner exception.
Top
See Also

Reference

InvalidValueException Class
GeonBit.UI.Exceptions Namespace


InvalidValueException Constructor

InvalidValueException Constructor
Create the exception without message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidValueException()
See Also

Reference

InvalidValueException Class
InvalidValueException Overload
GeonBit.UI.Exceptions Namespace


InvalidValueException Constructor (String)

InvalidValueException Constructor (String)
Create the exception with message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidValueException(
    string message
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.InvalidValueException.#ctor(System.String)"]

See Also

Reference

InvalidValueException Class
InvalidValueException Overload
GeonBit.UI.Exceptions Namespace


InvalidValueException Constructor (String, Exception)

InvalidValueException Constructor (String, Exception)
Create the exception with message and inner exception.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public InvalidValueException(
    string message,
    Exception inner
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.InvalidValueException.#ctor(System.String,System.Exception)"]

inner
Type: SystemException

[Missing <param name="inner"/> documentation for "M:GeonBit.UI.Exceptions.InvalidValueException.#ctor(System.String,System.Exception)"]

See Also

Reference

InvalidValueException Class
InvalidValueException Overload
GeonBit.UI.Exceptions Namespace


InvalidValueException Properties

InvalidValueException Properties

The InvalidValueException type exposes the following members.

Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
See Also

Reference

InvalidValueException Class
GeonBit.UI.Exceptions Namespace


InvalidValueException Methods

InvalidValueException Methods

The InvalidValueException type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

InvalidValueException Class
GeonBit.UI.Exceptions Namespace


NotFoundException Class

NotFoundException Class
Thrown when something is not found (key, value, index, etc.)
Inheritance Hierarchy
SystemObject
SystemException
GeonBit.UI.ExceptionsNotFoundException

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class NotFoundException : Exception

The NotFoundException type exposes the following members.

Constructors
 | Name | Description
Public method | NotFoundException | Create the exception without message.
Public method | NotFoundException(String) | Create the exception with message.
Public method | NotFoundException(String, Exception) | Create the exception with message and inner exception.
Top
Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

GeonBit.UI.Exceptions Namespace


NotFoundException Constructor

NotFoundException Constructor
Overload List
 | Name | Description
Public method | NotFoundException | Create the exception without message.
Public method | NotFoundException(String) | Create the exception with message.
Public method | NotFoundException(String, Exception) | Create the exception with message and inner exception.
Top
See Also

Reference

NotFoundException Class
GeonBit.UI.Exceptions Namespace


NotFoundException Constructor

NotFoundException Constructor
Create the exception without message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public NotFoundException()
See Also

Reference

NotFoundException Class
NotFoundException Overload
GeonBit.UI.Exceptions Namespace


NotFoundException Constructor (String)

NotFoundException Constructor (String)
Create the exception with message.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public NotFoundException(
    string message
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.NotFoundException.#ctor(System.String)"]

See Also

Reference

NotFoundException Class
NotFoundException Overload
GeonBit.UI.Exceptions Namespace


NotFoundException Constructor (String, Exception)

NotFoundException Constructor (String, Exception)
Create the exception with message and inner exception.

Namespace: GeonBit.UI.Exceptions
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public NotFoundException(
    string message,
    Exception inner
)

Parameters

message
Type: SystemString

[Missing <param name="message"/> documentation for "M:GeonBit.UI.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"]

inner
Type: SystemException

[Missing <param name="inner"/> documentation for "M:GeonBit.UI.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"]

See Also

Reference

NotFoundException Class
NotFoundException Overload
GeonBit.UI.Exceptions Namespace


NotFoundException Properties

NotFoundException Properties

The NotFoundException type exposes the following members.

Properties
 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
Public property | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
Public property | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Public property | Message | Gets a message that describes the current exception. (Inherited from Exception.)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
Public property | StackTrace | Gets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Public property | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
Top
See Also

Reference

NotFoundException Class
GeonBit.UI.Exceptions Namespace


NotFoundException Methods

NotFoundException Methods

The NotFoundException type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
Public method | GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
Public method | ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Top
See Also

Reference

NotFoundException Class
GeonBit.UI.Exceptions Namespace


GeonBit.UI.Utils Namespace

GeonBit.UI.Utils Namespace
GeonBit.UI.Utils contain different utilities and helper classes to use GeonBit.UI.
Classes
 | Class | Description
Public class | MessageBox | Helper class to generate message boxes and prompts.
Public class | MessageBoxMsgBoxOption | A button / option for a message box.
Public class | SimpleFileMenu | A helper class to generate simple file-menu (top navbar) using panels and dropdown entities.
Public class | SimpleFileMenuMenuLayout | Class used to define the file menu layout.


MessageBox Class

MessageBox Class
Helper class to generate message boxes and prompts.
Inheritance Hierarchy
SystemObject
GeonBit.UI.UtilsMessageBox

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class MessageBox

The MessageBox type exposes the following members.

Properties
Name | Description
IsMsgBoxOpened | Get if there's a message box currently opened.
OpenedMsgBoxesCount | Count currently opened message boxes.
Top
Methods
Name | Description
ShowMsgBox(String, String, String, NullableVector2) | Show a message box with just "OK".
ShowMsgBox(String, String, MessageBoxMsgBoxOption, Entity, NullableVector2, Action) | Show a message box with custom buttons and callbacks.
Top
Fields
Name | Description
BackgroundFaderColor | Will block and fade background with this color while messages are opened.
DefaultMsgBoxSize | Default size to use for message boxes.
DefaultOkButtonText | Default text for OK button.
Top
See Also

Reference

GeonBit.UI.Utils Namespace


MessageBox Properties

MessageBox Properties

The MessageBox type exposes the following members.

Properties
Name | Description
IsMsgBoxOpened | Get if there's a message box currently opened.
OpenedMsgBoxesCount | Count currently opened message boxes.
Top
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.IsMsgBoxOpened Property

MessageBoxIsMsgBoxOpened Property
Get if there's a message box currently opened.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsMsgBoxOpened { get; }

Property Value

Type: Boolean
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.OpenedMsgBoxesCount Property

MessageBoxOpenedMsgBoxesCount Property
Count currently opened message boxes.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static int OpenedMsgBoxesCount { get; }

Property Value

Type: Int32
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox Methods

MessageBox Methods
Methods
Name | Description
ShowMsgBox(String, String, String, NullableVector2) | Show a message box with just "OK".
ShowMsgBox(String, String, MessageBoxMsgBoxOption, Entity, NullableVector2, Action) | Show a message box with custom buttons and callbacks.
Top
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.ShowMsgBox Method

MessageBoxShowMsgBox Method
Overload List
Name | Description
ShowMsgBox(String, String, String, NullableVector2) | Show a message box with just "OK".
ShowMsgBox(String, String, MessageBoxMsgBoxOption, Entity, NullableVector2, Action) | Show a message box with custom buttons and callbacks.
Top
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.ShowMsgBox Method (String, String, String, Nullable(Vector2))

MessageBoxShowMsgBox Method (String, String, String, NullableVector2)
Show a message box with just "OK".

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Panel ShowMsgBox(
    string header,
    string text,
    string closeButtonTxt = null,
    Nullable<Vector2> size = null
)

Parameters

header
Type: SystemString
Message box title.
text
Type: SystemString
Main text to write on the message box.
closeButtonTxt (Optional)
Type: SystemString
Text for the closing button (if not provided will use default).
size (Optional)
Type: SystemNullable Vector2
Message box size (if not provided will use default).

Return Value

Type: Panel
Message box panel.
See Also

Reference

MessageBox Class
ShowMsgBox Overload
GeonBit.UI.Utils Namespace


MessageBox.ShowMsgBox Method (String, String, MessageBox.MsgBoxOption[], Entity[], Nullable(Vector2), Action)

MessageBoxShowMsgBox Method (String, String, MessageBoxMsgBoxOption, Entity, NullableVector2, Action)
Show a message box with custom buttons and callbacks.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Panel ShowMsgBox(
    string header,
    string text,
    MessageBoxMsgBoxOption[] options,
    Entity[] append = null,
    Nullable<Vector2> size = null,
    Action onDone = null
)

Parameters

header
Type: SystemString
Messagebox header.
text
Type: SystemString
Main text.
options
Type: GeonBit.UI.UtilsMessageBoxMsgBoxOption
Msgbox response options.
append (Optional)
Type: GeonBit.UI.EntitiesEntity
Optional array of entities to add to msg box under the text and above the buttons.
size (Optional)
Type: SystemNullable Vector2
Alternative size to use.
onDone (Optional)
Type: SystemAction
Optional callback to call when this msgbox closes.

Return Value

Type: Panel
Message box panel.
See Also

Reference

MessageBox Class
ShowMsgBox Overload
GeonBit.UI.Utils Namespace


MessageBox Fields

MessageBox Fields

The MessageBox type exposes the following members.

Fields
Name | Description
BackgroundFaderColor | Will block and fade background with this color while messages are opened.
DefaultMsgBoxSize | Default size to use for message boxes.
DefaultOkButtonText | Default text for OK button.
Top
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.BackgroundFaderColor Field

MessageBoxBackgroundFaderColor Field
Will block and fade background with this color while messages are opened.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Color BackgroundFaderColor

Field Value

Type: Color
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.DefaultMsgBoxSize Field

MessageBoxDefaultMsgBoxSize Field
Default size to use for message boxes.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Vector2 DefaultMsgBoxSize

Field Value

Type: Vector2
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.DefaultOkButtonText Field

MessageBoxDefaultOkButtonText Field
Default text for OK button.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static string DefaultOkButtonText

Field Value

Type: String
See Also

Reference

MessageBox Class
GeonBit.UI.Utils Namespace


MessageBox.MsgBoxOption Class

MessageBoxMsgBoxOption Class
A button / option for a message box.
Inheritance Hierarchy
SystemObject
GeonBit.UI.UtilsMessageBoxMsgBoxOption

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class MsgBoxOption

The MessageBoxMsgBoxOption type exposes the following members.

Constructors
 | Name | Description
Public method | MessageBoxMsgBoxOption | Create the message box option.
Top
Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
Fields
 | Name | Description
Public field | Callback | Callback to run when clicked. Return false to leave message box opened (true will close it).
Public field | Title | Option title (for the button).
Top
See Also

Reference

GeonBit.UI.Utils Namespace


MessageBox.MsgBoxOption Constructor

MessageBoxMsgBoxOption Constructor
Create the message box option.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public MsgBoxOption(
    string title,
    Func<bool> callback
)

Parameters

title
Type: SystemString
Text to write on the button.
callback
Type: SystemFunc Boolean
Action when clicked. Return false if you want to abort and leave the message opened, return true to close it.
See Also

Reference

MessageBoxMsgBoxOption Class
GeonBit.UI.Utils Namespace


MsgBoxOption Methods

MsgBoxOption Methods

The MessageBoxMsgBoxOption type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

MessageBoxMsgBoxOption Class
GeonBit.UI.Utils Namespace


MsgBoxOption Fields

MsgBoxOption Fields

The MessageBoxMsgBoxOption type exposes the following members.

Fields
 | Name | Description
Public field | Callback | Callback to run when clicked. Return false to leave message box opened (true will close it).
Public field | Title | Option title (for the button).
Top
See Also

Reference

MessageBoxMsgBoxOption Class
GeonBit.UI.Utils Namespace


MessageBox.MsgBoxOption.Callback Field

MessageBoxMsgBoxOptionCallback Field
Callback to run when clicked. Return false to leave message box opened (true will close it).

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Func<bool> Callback

Field Value

Type: Func Boolean
See Also

Reference

MessageBoxMsgBoxOption Class
GeonBit.UI.Utils Namespace


MessageBox.MsgBoxOption.Title Field

MessageBoxMsgBoxOptionTitle Field
Option title (for the button).

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string Title

Field Value

Type: String
See Also

Reference

MessageBoxMsgBoxOption Class
GeonBit.UI.Utils Namespace


SimpleFileMenu Class

SimpleFileMenu Class
A helper class to generate simple file-menu (top navbar) using panels and dropdown entities.
Inheritance Hierarchy
SystemObject
GeonBit.UI.UtilsSimpleFileMenu

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class SimpleFileMenu

The SimpleFileMenu type exposes the following members.

Methods
Name | Description
Create | Create the file menu and return the root panel. The result would be a panel containing a group of dropdown entities, which implement the file menu layout. The id of every dropdown is "menu-[menu-title]". Note: the returned file menu panel comes without parent, you need to add it to your UI tree manually.
Top
See Also

Reference

GeonBit.UI.Utils Namespace


SimpleFileMenu Methods

SimpleFileMenu Methods

The SimpleFileMenu type exposes the following members.

Methods
Name | Description
Create | Create the file menu and return the root panel. The result would be a panel containing a group of dropdown entities, which implement the file menu layout. The id of every dropdown is "menu-[menu-title]". Note: the returned file menu panel comes without parent, you need to add it to your UI tree manually.
Top
See Also

Reference

SimpleFileMenu Class
GeonBit.UI.Utils Namespace


SimpleFileMenu.Create Method

SimpleFileMenuCreate Method
Create the file menu and return the root panel. The result would be a panel containing a group of dropdown entities, which implement the file menu layout. The id of every dropdown is "menu-[menu-title]". Note: the returned file menu panel comes without parent, you need to add it to your UI tree manually.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Panel Create(
    SimpleFileMenuMenuLayout layout,
    PanelSkin skin = PanelSkin.Simple
)

Parameters

layout
Type: GeonBit.UI.UtilsSimpleFileMenuMenuLayout
Layout to create file menu for.
skin (Optional)
Type: GeonBit.UI.EntitiesPanelSkin
Skin to use for panels and dropdown of this file menu.

Return Value

Type: Panel
Menu root panel.
See Also

Reference

SimpleFileMenu Class
GeonBit.UI.Utils Namespace


SimpleFileMenu.MenuLayout Class

SimpleFileMenuMenuLayout Class
Class used to define the file menu layout.
Inheritance Hierarchy
SystemObject
GeonBit.UI.UtilsSimpleFileMenuMenuLayout

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class MenuLayout

The SimpleFileMenuMenuLayout type exposes the following members.

Constructors
 | Name | Description
Public method | SimpleFileMenuMenuLayout | Initializes a new instance of the SimpleFileMenuMenuLayout class
Top
Methods
 | Name | Description
Public method | AddItemToMenu | Adds an item to a menu.
Public method | AddMenu | Add a top menu.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

GeonBit.UI.Utils Namespace


SimpleFileMenu.MenuLayout Constructor

SimpleFileMenuMenuLayout Constructor
Initializes a new instance of the SimpleFileMenuMenuLayout class

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public MenuLayout()
See Also

Reference

SimpleFileMenuMenuLayout Class
GeonBit.UI.Utils Namespace


MenuLayout Methods

MenuLayout Methods

The SimpleFileMenuMenuLayout type exposes the following members.

Methods
 | Name | Description
Public method | AddItemToMenu | Adds an item to a menu.
Public method | AddMenu | Add a top menu.
Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.)
Public method | GetType | Gets the Type of the current instance. (Inherited from Object.)
Public method | ToString | Returns a string that represents the current object. (Inherited from Object.)
Top
See Also

Reference

SimpleFileMenuMenuLayout Class
GeonBit.UI.Utils Namespace


SimpleFileMenu.MenuLayout.AddItemToMenu Method

SimpleFileMenuMenuLayoutAddItemToMenu Method
Adds an item to a menu.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddItemToMenu(
    string menuTitle,
    string item,
    Action onClick
)

Parameters

menuTitle
Type: SystemString
Menu title to add item to.
item
Type: SystemString
Item text.
onClick
Type: SystemAction
On-click action.
See Also

Reference

SimpleFileMenuMenuLayout Class
GeonBit.UI.Utils Namespace


SimpleFileMenu.MenuLayout.AddMenu Method

SimpleFileMenuMenuLayoutAddMenu Method
Add a top menu.

Namespace: GeonBit.UI.Utils
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void AddMenu(
    string title,
    float width
)

Parameters

title
Type: SystemString
Menu title.
width
Type: SystemSingle
Menu width.
See Also

Reference

SimpleFileMenuMenuLayout Class
GeonBit.UI.Utils Namespace