Class TOlfFMXTextImageFrame
Unit
Declaration
type TOlfFMXTextImageFrame = class(TFrame)
Description
Display a text with a bitmap font.
Hierarchy
- TFrame
- TOlfFMXTextImageFrame
Overview
Methods
| Protected | function AjoutImageEtRetourneLargeur(AImages: TCustomImageList; AImageIndex: TImageIndex; AX: single; AChar: char): single; |
| Protected | function DefaultOnGetImageIndexOfUnknowChar(AChar: char): integer; virtual; |
| Protected | procedure DoEndUpdate; override; |
| Public | constructor Create(AOwner: TComponent); override; |
| Public | function RetourneLargeur(AImages: TCustomImageList; AImageIndex: TImageIndex): single; |
| Public | function getImageIndexOfChar(AChar: string; CallOnGetImageIndexOfUnknowCharIfNotFound: boolean = false): integer; |
| Public | procedure Refresh; |
Properties
| Protected | property HasPendingRefresh: boolean read FHasPendingRefresh
write SetHasPendingRefresh; |
| Public | property AutoSize: boolean read FAutoSize write SetAutoSize; |
| Public | property Font: TCustomImageList read FFont write SetFont; |
| Public | property Text: string read FText write SetText; |
| Public | property SpaceWidth: single read FSpaceWidth write SetSpaceWidth; |
| Public | property LetterSpacing: single read FLetterSpacing write SetLetterSpacing; |
| Public | property OnGetImageIndexOfUnknowChar: TOlfFMXTIFOnGetImageIndexOfUnknowChar
read FOnGetImageIndexOfUnknowChar write SetOnGetImageIndexOfUnknowChar; |
Description
Methods
| Protected | function AjoutImageEtRetourneLargeur(AImages: TCustomImageList; AImageIndex: TImageIndex; AX: single; AChar: char): single; |
|
Add an image (= a character as bitmap) and returns its width. | |
| Protected | function DefaultOnGetImageIndexOfUnknowChar(AChar: char): integer; virtual; |
|
Called by GetImageIndexOfChar() when no index for a char has been found after calling OnGetImageIndexOfUnknowChar event. | |
| Protected | procedure DoEndUpdate; override; |
|
Called at the end of a BeginUpdate/EndUpdate bloc. It calls the Refresh method if it has been asked in the bloc. | |
| Public | constructor Create(AOwner: TComponent); override; |
|
Create an instance of this class | |
| Public | function RetourneLargeur(AImages: TCustomImageList; AImageIndex: TImageIndex): single; |
|
Returns the width of a character image with current drawing height of the text. | |
| Public | function getImageIndexOfChar(AChar: string; CallOnGetImageIndexOfUnknowCharIfNotFound: boolean = false): integer; |
|
Returns the index of the char in the image list. If it's not found this function can call the OnGetImageIndexOfUnknowCharIfNotFound event or do a default character swap to find the good one.
Don't use True for CallOnGetImageIndexOfUnknowCharIfNotFound in your OnGetImageIndexOfUnknowCharIfNotFound events or you'll have infinite loops. | |
| Public | procedure Refresh; |
|
Repaint the text | |
Properties
| Protected | property HasPendingRefresh: boolean read FHasPendingRefresh
write SetHasPendingRefresh; |
|
Use to delay a Refresh operation during a BeginUpdate/EndUpdate bloc | |
| Public | property AutoSize: boolean read FAutoSize write SetAutoSize; |
|
If True, the text size is reduced or increased to fill its parent. If False, the text size depends only on its Height property, the Width is adapted after a Refresh. | |
| Public | property Font: TCustomImageList read FFont write SetFont; |
|
Font to use (an image list with characters as bitmaps) | |
| Public | property Text: string read FText write SetText; |
|
Text to display | |
| Public | property SpaceWidth: single read FSpaceWidth write SetSpaceWidth; |
|
Width to use when a text contains a space character. | |
| Public | property LetterSpacing: single read FLetterSpacing write SetLetterSpacing; |
|
Width to use between two letters. | |
| Public | property OnGetImageIndexOfUnknowChar: TOlfFMXTIFOnGetImageIndexOfUnknowChar
read FOnGetImageIndexOfUnknowChar write SetOnGetImageIndexOfUnknowChar; |
|
Event used to get the index of an unknow character in the font image list. | |
Generated by PasDoc 1.0.2.