This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
* If expression - ternary operator like C. | |
* | |
* HOW TO USE | |
* 1. uses uIfExp; | |
* 2. IfExp<TYPE>(BooleanValue) - TRUE_VALUE or FALSE_VALUE | |
* or | |
* IfExp<TYPE>(BooleanValue).ThenElse(TRUE_VALUE, FALSE_VALUE); | |
* | |
* EXAMPLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit uTabControlHelper; | |
interface | |
uses | |
FMX.TabControl; | |
type | |
TTabControlHelper = class helper for TTabControl | |
private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit JavaSample; | |
interface | |
uses | |
Androidapi.JNI.GraphicsContentViewText; | |
function SaveJavaBitmapToFile( | |
const iSrc: JBitmap; // JBitmap は android.graphics.Bitmap です。同様に接頭辞 J で始まる物は全部 Java のクラスです | |
const iFileName: String): Boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
* TMemoHelper | |
8 [Method List] | |
* FastAdd - Fast Add Method | |
* | |
* [How to use] | |
* 1. uses FMX.MemoHelper; | |
* 2. Memo1.FastAdd('something'); | |
*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// あんまり、おこらないかもしれない! | |
// | |
// IFMXApplicationEventService をTPlatformServices.Current.GetPlatformService から取り出して | |
// AppEventService.SetApplicationEventHandler(AppEvent); をして | |
// そのイベントハンドラで以下の様にする | |
function TLifecycleManager.AppEvent( | |
iAppEvent: TApplicationEvent; | |
iContext: TObject): Boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program Project1; | |
type | |
TFoo<T> = class; // interface から class に変えた | |
TBaz<T> = record | |
Value: TFoo<TArray<T>>; // E2604 ジェネリック型を再帰的に使用しています | |
end; | |
TFoo<T> = class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program Project1; | |
type | |
IFoo<T> = interface; | |
TBar<T> = record | |
Value: IFoo<TArray<T>>; | |
end; | |
IFoo<T> = interface |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program Project1; | |
uses | |
System.SysUtils; | |
type | |
TTest<T> = record | |
Value: T; | |
end; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit uKeyHook; | |
interface | |
uses | |
Winapi.Windows; | |
type | |
TKeyHookEvent = procedure(const iVKKey, iState: DWORD) of object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
Macapi.ObjectiveC, | |
Macapi.CocoaTypes, | |
Macapi.Foundation, | |
Macapi.AppKit, | |
FMX.Platform.Mac | |
procedure SetMinSize(const iForm: TForm; const iMinW, iMin: Integer); | |
var | |
Wnd: NSWindow; // OS X 用のクラスがそのまま使えてる |