Unit CastleLCLUtils
Description
Utilities for cooperation between LCL and "Castle Game Engine".
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
procedure FileFiltersToDialog(const FileFilters: string; const Dialog: TFileDialog; const AllFields: boolean = true); |
Convert file filters into LCL Dialog.Filter, Dialog.FilterIndex. Suitable for both open and save dialogs (TOpenDialog, TSaveDialog both descend from TFileDialog).
Input filters are either given as a string FileFilters (encoded just like for TFileFilterList.AddFiltersFromString), or as TFileFilterList instance.
Output filters are either written to LCLFilter, LCLFilterIndex variables, or set appropriate properties of given Dialog instance.
When AllFields is false, then filters starting with "All " in the name, like "All files", "All images", are not included in the output.
|
procedure FileFiltersToDialog(const FileFilters: string; const Edit: TFileNameEdit; const AllFields: boolean = true); |
|
procedure FileFiltersToDialog(FFList: TFileFilterList; const Dialog: TFileDialog; const AllFields: boolean = true); |
|
procedure FileFiltersToDialog(const FileFilters: string; out LCLFilter: string; out LCLFilterIndex: Integer; const AllFields: boolean = true); deprecated 'use TFileFilterList.LclFmxFiltersFromString'; |
Warning: this symbol is deprecated: use TFileFilterList.LclFmxFiltersFromString |
procedure FileFiltersToDialog(FFList: TFileFilterList; out LCLFilter: string; out LCLFilterIndex: Integer; const AllFields: boolean = true); deprecated 'use TFileFilterList.LclFmxFilters'; |
Warning: this symbol is deprecated: use TFileFilterList.LclFmxFilters |
function SQuoteLCLCaption(const S: string): string; |
Make each '&' inside string '&&', this way the string will not contain special '&x' sequences when used as a TMenuItem.Caption and such.
|
procedure FileFiltersToOpenDialog(const FileFilters: string; Dialog: TFileDialog); deprecated; |
Warning: this symbol is deprecated.
Deprecated names, use the identifiers without "Open" in new code.
|
procedure FileFiltersToOpenDialog(const FileFilters: string; out LCLFilter: string; out LCLFilterIndex: Integer); deprecated; |
Warning: this symbol is deprecated. |
procedure FileFiltersToOpenDialog(FFList: TFileFilterList; out LCLFilter: string; out LCLFilterIndex: Integer); deprecated; |
Warning: this symbol is deprecated. |
function KeyToCastle(const Key: Word; const Shift: TShiftState): TKey; |
Convert Key (Lazarus key code) to Castle Game Engine TKey. Returns keyNone if not possible.
|
procedure KeyFromCastle(const Key: TKey; const KeyString: String; out KeyCode: Word; out Shift: TShiftState); |
Convert TKey and/or character code into Lazarus key code (VK_xxx) and shift state. Sets KeyCode to VK_UNKNOWN (zero) when conversion not possible (or when Key = keyNone and KeyString = '').
|
procedure KeyFromCastle(const Key: TKey; KeyString: String; const Modifiers: TModifierKeys; out KeyCode: Word; out Shift: TShiftState); |
|
function MouseButtonToCastle( const MouseButton: TMouseButton; out MyMouseButton: TCastleMouseButton): boolean; |
Convert Lazarus TMouseButton value to Castle Game Engine TCastleMouseButton.
|
function CursorFromCastle(const Cursor: TMouseCursor): TCursor; |
Convert CGE to LCL cursor type.
|
function FilenameToUriSafeUTF8(const FileName: string): string; |
Not necessary. Converts between Lazarus String encoding for filenames (which is UTF-8) and CGE encoding for filenames (which is also UTF-8). So this in practice does nothing.
|
function UriToFilenameSafeUTF8(const Url: String): string; |
|
function ColorToVector3(const Color: TColor): TVector3; |
Convert LCL color values to CGE colors (vectors).
|
function ColorToVector3Byte(const Color: TColor): TVector3Byte; |
|
Types
TControlInputPressReleaseEvent = procedure (Sender: TObject; const Event: TInputPressRelease) of object; |
|
TControlInputMotionEvent = procedure (Sender: TObject; const Event: TInputMotion) of object; |
|
Generated by PasDoc 0.16.0.