Click or drag to resize
Label Class
A label used for displaying text.
Inheritance Hierarchy

Namespace: Mentula.GuiItems.Items
Assembly: XnaGuiItems (in XnaGuiItems.dll) Version: 1.0.0.0
Syntax
C#
public class Label : GuiItem

The Label type exposes the following members.

Constructors
  NameDescription
Public methodLabel(SpriteBatch, SpriteFont)
Initializes a new instance of the Label class with default settings.
Public methodLabel(SpriteBatch, Rect, SpriteFont)
Initializes a new instance of the Label class with a specific size.
Top
Properties
  NameDescription
Public propertyAutoRefresh
Gets or sets a value indicating if the Label will call Refresh on a TextChanged event.
Public propertyAutoSize
Gets or sets a value indicating if the Label will adjust its size to the text.
Public propertyBackColor
Gets or sets the background color for the GuiItem.
(Inherited from GuiItem.)
Public propertyBackgroundImage
Gets or sets the background image displayed in the GuiItem.
(Inherited from GuiItem.)
Public propertyBorderStyle
Gets or sets the type of border given to the Label.
Public propertyBounds
Gets or sets the size of the GuiItem including its nonclient elements in pixels.
(Inherited from GuiItem.)
Public propertyDisposing
Gets a value indicating wether the base GuiItem class is in the process of disposing.
(Inherited from GuiItem.)
Public propertyEnabled
Gets or sets a value indicating whether the GuiItem can respond to user interaction.
(Inherited from GuiItem.)
Public propertyFont
Gets or sets the font used by the Label.
Public propertyForeColor
Gets or sets the foregound color for the GuiItem.
(Inherited from GuiItem.)
Public propertyForegroundRectangle
Gets or sets the Rectangle used to draw the text.
Public propertyHeight
Gets or sets the height of the GuiItem including its nonclient elements in pixels.
(Inherited from GuiItem.)
Public propertyIsDisposed
Gets a value indicating whether the GuiItem has been disposed.
(Inherited from GuiItem.)
Public propertyLineStart
Gets or sets a value indicating from what line the Label should be shown.
Public propertyName
Gets or sets the name of the GuiItem.
(Inherited from GuiItem.)
Public propertyOrigin
Gets or sets a value indicating the origin of rotation.
(Inherited from GuiItem.)
Public propertyPosition
Gets or sets the position of the GuiItem.
(Inherited from GuiItem.)
Public propertyRotation
Gets or sets the client side rotation of the GuiItem.
(Inherited from GuiItem.)
Public propertySize
Gets or sets the size of the GuiItem.
(Inherited from GuiItem.)
Public propertySuppressDraw (Inherited from GuiItem.)
Public propertySuppressUpdate (Inherited from GuiItem.)
Public propertyText
Gets or sets the text of the Label.
Public propertyVisible
Gets or sets a value indicating whether the GuiItem is displayed.
(Inherited from GuiItem.)
Public propertyWidth
Gets or sets the width of the GuiItem including its nonclient elements in pixels.
(Inherited from GuiItem.)
Public propertyX
Gets or sets the horizontal component of the GuiItem.
(Inherited from GuiItem.)
Public propertyY
Gets or sets the vertical component of the GuiItem.
(Inherited from GuiItem.)
Top
Methods
  NameDescription
Public methodDispose
Releases the managed and unmanaged resources used by the GuiItem.
(Inherited from GuiItem.)
Protected methodDispose(Boolean)
Releases the unmanaged and managed resources used by the GuiItem.
(Inherited from GuiItem.)
Public methodDraw
Draws the GuiItem to the specified SpriteBatch.
(Inherited from GuiItem.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Disposes the unmanaged resources.
(Inherited from GuiItem.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLineCount
Get the number of lines in this Label
Protected methodGetMouseEventArgs
Gets the mouse state as a MouseEventArgs object.
(Inherited from GuiItem.)
Protected methodCode exampleGetRotatedMouse
Gets the position of the mouse in respect to the GuiItem.
(Inherited from GuiItem.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHandleAutoSize
Handles the AutoSize functionality.
Public methodHide
Disables the GuiItem and makes it hiden.
(Inherited from GuiItem.)
Protected methodInitEvents
Handles the initializing of the events.
(Overrides GuiItemInitEvents.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveRelative
Moves the GuiItem to a specified relative position. If x is set the horizontal component of the anchor will have no effect. If y is set the vertical component of the anchor will have no effect.
(Inherited from GuiItem.)
Protected methodOnBackColorChanged
This method is called when the BackColorChanged event is raised.
(Inherited from GuiItem.)
Protected methodOnBackgroundImageChanged
This method is called when the BackgroundImageChanged event is raised.
(Inherited from GuiItem.)
Protected methodOnEnabledChanged
This method is called when the EnabledChanged event is raised.
(Inherited from GuiItem.)
Protected methodOnFontChanged
This method is called when the FontChanged event is raised.
Protected methodOnForeColorChanged
This method is called when the ForeColorChanged event is raised.
(Overrides GuiItemOnForeColorChanged(GuiItem, ValueChangedEventArgsColor).)
Protected methodOnMove
This method is called when the Moved event is raised.
(Overrides GuiItemOnMove(GuiItem, ValueChangedEventArgsVector2).)
Protected methodOnNameChange
This method is called when the NameChanged event is raised.
(Inherited from GuiItem.)
Protected methodOnResize
This method is called when the Resized event is raised.
(Overrides GuiItemOnResize(GuiItem, ValueChangedEventArgsSize).)
Protected methodOnRotationChanged
This method is called when the Rotated event is raised.
(Inherited from GuiItem.)
Protected methodOnTextChanged
This method is called when the TextChanged event is raised.
Protected methodOnVisibilityChanged
This method is called when the VisibilityChanged event is raised.
(Inherited from GuiItem.)
Public methodPerformClick
Perform a mouse click.
(Inherited from GuiItem.)
Public methodRefresh
Recalculates the background and the foreground.
(Overrides GuiItemRefresh.)
Protected methodSetBackgroundTexture
Sets the background texture for the Label.
(Overrides GuiItemSetBackgroundTexture.)
Protected methodSetForegroundTexture
Sets the foreground texture for the Label.
(Overrides GuiItemSetForegroundTexture.)
Protected methodSetTextureHandler
Sets textures to the required TextureHandler.
(Overrides GuiItemSetTextureHandler.)
Public methodShow
Enables the GuiItem and makes it visible.
(Inherited from GuiItem.)
Public methodToString
Returns a string that represents the current GuiItem.
(Inherited from GuiItem.)
Public methodUpdate
Updates the GuiItem, checking if any mouse event are occuring.
(Inherited from GuiItem.)
Top
Events
  NameDescription
Public eventBackColorChanged
Occurs when the value of the BackColor property changes.
(Inherited from GuiItem.)
Public eventBackgroundImageChanged
Occurs when the value of the BackgroundImage property changes.
(Inherited from GuiItem.)
Public eventClicked
Occurs when the GuiItem is clicked.
(Inherited from GuiItem.)
Public eventEnabledChanged
Occurs when the Enabled property changes.
(Inherited from GuiItem.)
Public eventFontChanged
Occurs when the value of the Font propery is changed.
Public eventForeColorChanged
Occurs when the ForeColor property changes.
(Inherited from GuiItem.)
Public eventHover
Occurs when the mouse pointer rests on the GuiItem.
(Inherited from GuiItem.)
Public eventHoverEnter
Occurs when the mouse pointer enters the GuiItem.
(Inherited from GuiItem.)
Public eventHoverLeave
Occurs when the mouse pointer leaves the GuiItem.
(Inherited from GuiItem.)
Public eventMoved
Occurs when the GuiItem is moved.
(Inherited from GuiItem.)
Public eventNameChanged
Occurs when the Name proprty changes.
(Inherited from GuiItem.)
Public eventResized
Occurs when the GuiItem is resized.
(Inherited from GuiItem.)
Public eventRotated
Occurs when the Rotation propery changes.
(Inherited from GuiItem.)
Public eventTextChanged
Occurs when the value of the Text propery is changed.
Public eventVisibilityChanged
Occurs when the Visible property changes.
(Inherited from GuiItem.)
Top
Fields
  NameDescription
Protected fieldbatch
The SpriteBatch used for generating the underlying Texture2D.
(Inherited from GuiItem.)
Protected fieldfont
The specified SpriteFont.
Protected fieldforegroundRectangle
The rectangle used in the foreground.
Protected fieldleftDown
Whether the GuiItem is left clicked.
(Inherited from GuiItem.)
Protected fieldover
Whether the Mouse is hovering over the GuiItem.
(Inherited from GuiItem.)
Protected fieldrightDown
Whether the GuiItem is right clicked.
(Inherited from GuiItem.)
Protected fieldtextures
Stores the Texture2D used for drawing.
(Inherited from GuiItem.)
Top
See Also