Castle Game Engine: CastleControls: Class TUIControlFont

# Class TUIControlFont
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleControls ## Declaration `type TUIControlFont = class(TUIRectangularControl)` ## Description Base class for all controls inside an OpenGL context using a font. ## Hierarchy TComponent TInputListener TUIControl TUIRectangularControl TUIControlFont ## Overview ### Methods
| `function Font: TCastleFont; virtual;`
| `procedure FontChanged; virtual;`
| `destructor Destroy; override;`
| `procedure GLContextClose; override;`
| `function TooltipExists: boolean; override;`
| `procedure TooltipRender; override;`
| `procedure Render; override;`
| `procedure CheckFontChanged;`
### Properties
| `property Tooltip: string read FTooltip write FTooltip;`
| `property CustomFont: TCastleFont read FCustomFont write SetCustomFont;`
| `property OwnsCustomFont: boolean read FOwnsCustomFont write FOwnsCustomFont default false;`
## Description ### Methods
| `function Font: TCastleFont; virtual;`
Font custom to this control. By default this returns UIFont, you can override this to return your font. It's OK to return here `Nil` if font is not ready yet, but during Render (when OpenGL context is available) font must be ready.
| `procedure FontChanged; virtual;`
Called when Font result changed, either by setting CustomFont or when UIFont assigned changed.
| `destructor Destroy; override;`
| `procedure GLContextClose; override;`
| `function TooltipExists: boolean; override;`
| `procedure TooltipRender; override;`
| `procedure Render; override;`
| `procedure CheckFontChanged;`
Check does currently used font (see CustomFont) changed, and eventually call FontChanged method now. You only need to explicitly call this in very specific circumstances, when you just changed UIFont (changing CustomFont automatically immediately calls FontChanged) and you want control size to be updated immediately (for example, you need TCastleButton.Height to be immediately valid). Without calling this, it could be updated only at next Render call.
### Properties
| `property Tooltip: string read FTooltip write FTooltip;`
Tooltip string, displayed when user hovers the mouse over a control. Note that you can override TUIControl.TooltipExists and TUIControl.TooltipStyle and TUIControl.TooltipRender to customize the tooltip drawing.
| `property CustomFont: TCastleFont read FCustomFont write SetCustomFont;`
When non-nil, this font will be used to draw this control. Otherwise the default UIFont will be used.
| `property OwnsCustomFont: boolean read FOwnsCustomFont write FOwnsCustomFont default false;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09