Click or drag to resize
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

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

The Header type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAddHyphenWhenBreakWord
If true and a long word is broken due to word wrap, will add hyphen at the breaking point.
(Inherited from Paragraph.)
Public propertyAlignToCenter
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 propertyAnchor
Set / get anchor.
(Inherited from Entity.)
Public propertyBackground
Optional background entity that will not respond to events and will always be rendered right behind this entity.
(Inherited from Entity.)
Public propertyBreakWordsIfMust
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 propertyChildren
Get / set children list.
(Inherited from Entity.)
Public propertyDraggable
Is the entity draggable (eg can a user grab it and drag it around).
(Inherited from Entity.)
Public propertyEntityDefaultSize
Return the default size for this entity.
(Inherited from Entity.)
Public propertyFillColor
Entity fill color - this is just a sugarcoat to access the default fill color style property.
(Inherited from Entity.)
Public propertyInternalDestRect
Get internal destination rect.
(Inherited from Entity.)
Public propertyIsFocused
Does this entity or one of its children currently focused?
(Inherited from Entity.)
Public propertyIsMouseDown
Return if the mouse is currently pressing on this entity (eg over it and left mouse button is down).
(Inherited from Entity.)
Public propertyIsMouseOver
Return if the mouse is currently over this entity (regardless of whether or not mouse button is down).
(Inherited from Entity.)
Public propertyMaxCharactersInLine
Get how many characters can fit in a single line.
(Inherited from Paragraph.)
Public propertyMaxSize
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 propertyMinSize
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 propertyOffset
Set / get offset.
(Inherited from Entity.)
Public propertyOpacity
Entity fill color opacity - this is just a sugarcoat to access the default fill color alpha style property.
(Inherited from Entity.)
Public propertyOutlineColor
Entity outline color - this is just a sugarcoat to access the default outline color style property.
(Inherited from Entity.)
Public propertyOutlineOpacity
Entity outline color opacity - this is just a sugarcoat to access the default outline color alpha style property.
(Inherited from Entity.)
Public propertyOutlineWidth
Entity outline width - this is just a sugarcoat to access the default outline color style property.
(Inherited from Entity.)
Public propertyPadding
Entity padding - this is just a sugarcoat to access the default padding style property.
(Inherited from Entity.)
Public propertyParent
Get the direct parent of this entity.
(Inherited from Entity.)
Public propertyRawStyleSheet
Get / set raw stylesheet.
(Inherited from Entity.)
Public propertyScale
Entity scale - this is just a sugarcoat to access the default scale style property.
(Inherited from Entity.)
Public propertyShadowColor
Entity shadow color - this is just a sugarcoat to access the default shadow color style property.
(Inherited from Entity.)
Public propertyShadowOffset
Entity shadow offset - this is just a sugarcoat to access the default shadow offset style property.
(Inherited from Entity.)
Public propertyShadowScale
Entity shadow scale - this is just a sugarcoat to access the default shadow scale style property.
(Inherited from Entity.)
Public propertySize
Entity current size property.
(Inherited from Entity.)
Public propertySpaceAfter
Extra space (in pixels) to reserve *after* this entity when using Auto Anchors.
(Inherited from Entity.)
Public propertySpaceBefore
Extra space (in pixels) to reserve *before* this entity when using Auto Anchors.
(Inherited from Entity.)
Public propertyState
Current entity state (default / mouse hover / mouse down..).
(Inherited from Entity.)
Public propertyText
Get / Set the paragraph text.
(Inherited from Paragraph.)
Public propertyTextStyle
Current font style - this is just a sugarcoat to access the default font style property.
(Inherited from Paragraph.)
Public propertyVisible
Set / get visibility.
(Inherited from Entity.)
Public propertyWrapWords
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
  NameDescription
Public methodAddChild
Add a child entity.
(Inherited from Entity.)
Public methodAttachAnimator
Add animator to this entity.
(Inherited from Entity.)
Public methodBringToFront
Bring this entity to be on front (inside its parent).
(Inherited from Entity.)
Public methodCalcDestRect
Calculate and return the destination rectangle, eg the space this entity is rendered on.
(Inherited from Entity.)
Public methodCalcTextActualRectWithWrap
Calculate the paragraph actual destination rect with word-wrap and other factors taken into consideration.
(Inherited from Paragraph.)
Public methodClearChildren
Remove all children entities.
(Inherited from Entity.)
Public methodDraw
Draw this entity and its children.
(Inherited from Entity.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindT(String, Boolean)
Find and return first occurance of a child entity with a given identifier and specific type.
(Inherited from Entity.)
Public methodGetActiveStyle
Return stylesheet property for current entity state (or default if undefined for state).
(Inherited from Entity.)
Public methodGetActualDestRect
Get the actual destination rect that this paragraph takes (based on text content, font size, and word wrap).
(Inherited from Paragraph.)
Public methodGetCharacterActualSize
Get the size, in pixels, of a single character in paragraph.
(Inherited from Paragraph.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetProcessedText
Return the processed text that is actually displayed on screen, after word-wrap etc.
(Inherited from Paragraph.)
Public methodGetRelativeOffset
Return the relative offset, in pixels, from parent top-left corner.
(Inherited from Entity.)
Public methodGetStyleProperty
Return stylesheet property for a given state.
(Inherited from Entity.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsDeepChildOf
Check if this entity is a descendant of another entity. This goes up all the way to root.
(Inherited from Entity.)
Public methodIsDisabled
Return if this entity is currently disabled, due to self or one of the parents / grandparents being disabled.
(Inherited from Entity.)
Public methodIsLocked
Return if this entity is currently locked, due to self or one of the parents / grandparents being locked.
(Inherited from Entity.)
Public methodIsTouching
Test if a given point is inside entity's boundaries.
(Inherited from Entity.)
Public methodIsVisible
Return if this entity is currently visible, eg this and all its parents and grandparents are visible.
(Inherited from Entity.)
Public methodIterateChildren
Iterate over children and call 'callback' for every direct child of this entity.
(Inherited from Entity.)
Public methodPropagateEventsTo
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 methodRemoveAnimator
Remove animator from entity.
(Inherited from Entity.)
Public methodRemoveChild
Remove child entity.
(Inherited from Entity.)
Public methodRemoveFromParent
Remove this entity from its parent.
(Inherited from Entity.)
Public methodSendToBack
Push this entity to the back (inside its parent).
(Inherited from Entity.)
Public methodSetAnchorAndOffset
Set the position and anchor of this entity.
(Inherited from Entity.)
Public methodSetStyleProperty
Set a stylesheet property.
(Inherited from Entity.)
Public methodToEntitiesDictionary
Create and return a dictionary of entities, where key is Identifier and value is the entity. This will include self + all children (and their children), and will only include entities that have Identifier property defined. Note: if multiple entities share the same identifier, the deepest entity in hirarchy will end up in dict.
(Inherited from Entity.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Called every frame to update entity state and call events.
(Inherited from Entity.)
Public methodUpdateStyle
Update the entire stylesheet from a different stylesheet.
(Inherited from Entity.)
Public methodWrapText
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
  NameDescription
Public fieldAfterDraw
Callback to execute every frame after this entity is rendered.
(Inherited from Entity.)
Public fieldAfterUpdate
Callback to execute every frame after this entity updates.
(Inherited from Entity.)
Public fieldAttachedData
Optional data you can attach to this entity and retrieve later (for example when handling events).
(Inherited from Entity.)
Public fieldBackgroundColor
Optional background color for text.
(Inherited from Paragraph.)
Public fieldBackgroundColorPadding
Extra padding for background color.
(Inherited from Paragraph.)
Public fieldBackgroundColorUseBoxSize
If true and have background color, will use the paragraph box size for it instead of the text actual size.
(Inherited from Paragraph.)
Public fieldBeforeDraw
Callback to execute every frame before this entity is rendered.
(Inherited from Entity.)
Public fieldBeforeUpdate
Callback to execute every frame before this entity updates.
(Inherited from Entity.)
Public fieldClickThrough
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 fieldStatic memberDefaultStyle
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 fieldEnabled
Is the entity currently enabled? If false, will not be interactive and be rendered with a greyscale effect.
(Inherited from Entity.)
Public fieldExtraMargin
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 fieldFontOverride
An optional font you can set to override the default fonts. NOTE! Only monospace fonts are supported!
(Inherited from Paragraph.)
Public fieldIdentifier
Optional identifier you can attach to entities so you can later search and retrieve by.
(Inherited from Entity.)
Public fieldInheritParentState
If true, this entity will always inherit its parent state. This is useful for stuff like a paragraph that's attached to a button etc. NOTE!!! entities that inherit parent state will not trigger any events either.
(Inherited from Entity.)
Public fieldLimitDraggingToParentBoundaries
If true, users will not be able to drag this entity outside its parent boundaries.
(Inherited from Entity.)
Public fieldLocked
If true, this entity and its children will not respond to events (but will be drawn normally, unlike when disabled).
(Inherited from Entity.)
Public fieldOnClick
Callback to execute when user clicks on this entity (eg release mouse over it).
(Inherited from Entity.)
Public fieldOnFocusChange
Callback to execute every time this entity focus / unfocus.
(Inherited from Entity.)
Public fieldOnMouseDown
Callback to execute when mouse button is pressed over this entity (called once when button is pressed).
(Inherited from Entity.)
Public fieldOnMouseEnter
Callback to execute when mouse start hovering over this entity (eg enters its region).
(Inherited from Entity.)
Public fieldOnMouseLeave
Callback to execute when mouse stop hovering over this entity (eg leaves its region).
(Inherited from Entity.)
Public fieldOnMouseReleased
Callback to execute when mouse button is released over this entity (called once when button is released).
(Inherited from Entity.)
Public fieldOnMouseWheelScroll
Callback to execute when mouse wheel scrolls and this entity is the active entity.
(Inherited from Entity.)
Public fieldOnRightClick
Callback to execute when user clicks on this entity with right mouse button (eg release mouse over it).
(Inherited from Entity.)
Public fieldOnRightMouseDown
Callback to execute when right mouse button is pressed over this entity (called once when button is pressed).
(Inherited from Entity.)
Public fieldOnStartDrag
Called when entity starts getting dragged (only if draggable).
(Inherited from Entity.)
Public fieldOnStopDrag
Called when entity stop getting dragged (only if draggable).
(Inherited from Entity.)
Public fieldOnValueChange
Callback to execute when entity value changes (relevant only for entities with value).
(Inherited from Entity.)
Public fieldOnVisiblityChange
Callback to execute every time the visibility of this entity changes (also invokes when parent becomes invisible / visible again).
(Inherited from Entity.)
Public fieldPriorityBonus
Optional extra drawing priority, to bring certain objects before others.
(Inherited from Entity.)
Public fieldPromiscuousClicksMode
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 fieldToolTipText
Optional tooltip text to show if the user points on this entity for long enough.
(Inherited from Entity.)
Public fieldUseActualSizeForCollision
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 fieldWhileDragging
Called every frame while the entity is being dragged.
(Inherited from Entity.)
Public fieldWhileMouseDown
Callback to execute every frame while mouse button is pressed over the entity.
(Inherited from Entity.)
Public fieldWhileMouseHover
Callback to execute every frame while mouse is hovering over the entity (not called while mouse button is down).
(Inherited from Entity.)
Public fieldWhileMouseHoverOrDown
Callback to execute every frame while mouse is hovering over the entity, even if mouse is down.
(Inherited from Entity.)
Public fieldWhileRightMouseDown
Callback to execute every frame while right mouse button is pressed over the entity.
(Inherited from Entity.)
Top
See Also