├── .gitattributes ├── .gitignore ├── .gitmodules ├── 10.4-demos ├── DBGrid_DBNavigator_Demo │ ├── DBGrid_DBNavigator_Demo.dpr │ ├── DBGrid_DBNavigator_Demo.dproj │ ├── DBGrid_DBNavigator_Demo.res │ ├── DBGrid_DBNavigator_MainUnit.dfm │ └── DBGrid_DBNavigator_MainUnit.pas ├── DynamicStyles.txt ├── Dynamic_Per_Conrol_Styles │ ├── DynamicStyles.dpr │ ├── DynamicStyles.dproj │ ├── DynamicStyles.res │ ├── DynamicStylesMain.dfm │ └── DynamicStylesMain.pas ├── EmojiDemo │ ├── EmojiDemo-DesignTime.png │ ├── EmojiDemo-Running.png │ ├── EmojiDemo.deployproj │ ├── EmojiDemo.dpr │ ├── EmojiDemo.dproj │ ├── EmojiDemo.res │ ├── MainFormU.fmx │ ├── MainFormU.pas │ └── readme.md ├── HealthSystem-PerControlVclStyles │ └── readme.md ├── HealthSystem │ ├── HealthSystem.res │ ├── HealthSystem_Unit1.dfm │ ├── HealthSystem_Unit1.pas │ ├── Per_Control_Styles_HealthSystem.dpr │ ├── Per_Control_Styles_HealthSystem.dproj │ └── Per_Control_Styles_HealthSystem.res ├── ImageIndex_ImageName_Demo │ ├── ImageIndex_ImageName.dpr │ ├── ImageIndex_ImageName.dproj │ ├── ImageIndex_ImageName.res │ ├── ImageIndex_ImageName_MainUnit.dfm │ └── ImageIndex_ImageName_MainUnit.pas ├── LiveBindings │ ├── LiveBindingCheckBoxes.dpr │ ├── LiveBindingCheckBoxes.dproj │ ├── LiveBindingCheckBoxes.res │ ├── LiveBindingsCheckBoxFrame.dfm │ ├── LiveBindingsCheckBoxFrame.pas │ ├── LiveBindingsCheckBoxMain.dfm │ ├── LiveBindingsCheckBoxMain.pas │ ├── LiveBindingsDataModule.dfm │ └── LiveBindingsDataModule.pas ├── ManagedRecords │ ├── ManagedRecords.res │ ├── ManagedRecordsGUI.dpr │ ├── ManagedRecordsGUI.dproj │ ├── ManagedRecordsGUI.res │ ├── ManagedRecordsUnit1.fmx │ └── ManagedRecordsUnit1.pas ├── ManagedRecordsConsole │ ├── ManagedRecords.res │ ├── ManagedRecordsConsole.dpr │ ├── ManagedRecordsConsole.dproj │ └── ManagedRecordsConsole.res ├── Messages_Demo │ ├── Messages_Demo.dpr │ ├── Messages_Demo.dproj │ ├── Messages_Demo.res │ ├── Messages_Demo_MainUnit.dfm │ └── Messages_Demo_MainUnit.pas ├── MetalDemo │ ├── MetalDemo.dpr │ ├── MetalDemo.dproj │ ├── MetalDemo.res │ ├── MetalDemoUnit1.fmx │ └── MetalDemoUnit1.pas ├── Per_Control_Styles │ ├── Colorful_Main1.dfm │ ├── Colorful_Main1.pas │ ├── Colors.res │ ├── Per_Control_Styles_Colorful.dpr │ ├── Per_Control_Styles_Colorful.dproj │ └── Per_Control_Styles_Colorful.res ├── README.md ├── RTTISpeed │ ├── DeSerTest_Rio.dpr │ ├── DeSerTest_Rio.dproj │ ├── DeSerTest_Rio.res │ ├── DeSerTest_Sydney.dpr │ ├── DeSerTest_Sydney.dproj │ ├── DeSerTest_Sydney.res │ ├── MainFormU.dfm │ ├── MainFormU.pas │ ├── Rio_Sydney_Comparison.png │ └── readme.md ├── ScaledGraphicDrawer_Png_Bmp32_Demo │ ├── Project1.res │ ├── ScaledGraphicDrawer_Demo.dpr │ ├── ScaledGraphicDrawer_Demo.dproj │ ├── ScaledGraphicDrawer_Demo.res │ ├── ScaledGraphicDrawer_MainUnit.dfm │ ├── ScaledGraphicDrawer_MainUnit.pas │ └── ScaledGraphicDrawer_Png_Demo.res ├── Scaled_Jelly_Drawer_Demo │ ├── Scaled_Jelly_Drawer_Demo.dpr │ ├── Scaled_Jelly_Drawer_Demo.dproj │ ├── Scaled_Jelly_Drawer_Demo.res │ ├── Scaled_Jelly_Drawer_MainUnit.dfm │ └── Scaled_Jelly_Drawer_MainUnit.pas ├── SetOfStrings │ ├── MainFormU.dfm │ ├── MainFormU.pas │ ├── SetOfStrU.pas │ ├── StringSetDemo.dpr │ ├── StringSetDemo.dproj │ └── readme.md ├── SydneyDemos.groupproj ├── VCLControlColorsB │ ├── VCLColorButtonsUnit1.dfm │ ├── VCLColorButtonsUnit1.pas │ ├── VCLControlColorsB.res │ ├── VCLControlColorsButtons.dpr │ ├── VCLControlColorsButtons.dproj │ └── VCLControlColorsButtons.res ├── VirtualImage_Demo │ ├── Project1.dpr │ ├── Project1.dproj │ ├── Project1.res │ ├── Unit1.dfm │ └── Unit1.pas ├── mangedrecords with Assign │ ├── ManagedRecords_101.dpr │ ├── ManagedRecords_101.dproj │ ├── ManagedRecords_101_form.dfm │ ├── ManagedRecords_101_form.pas │ └── mr_101.res └── readme.md ├── 10.4.2-demos ├── ControlListDraw │ ├── ControlListDemoFrm1.dfm │ ├── ControlListDemoFrm1.pas │ ├── ControlListDrawDemo.dpr │ ├── ControlListDrawDemo.dproj │ └── ControlListDrawDemo.res ├── ControlListLiveBinding │ ├── ControlListLiveBindingDemo.dpr │ ├── ControlListLiveBindingDemo.dproj │ ├── ControlListLiveBindingDemo.res │ ├── ControlListLiveBindingUnit1.dfm │ └── ControlListLiveBindingUnit1.pas ├── EdgeView │ ├── EdgeMain.dfm │ ├── EdgeMain.pas │ ├── EdgeView.dpr │ ├── EdgeView.dproj │ └── EdgeView.res ├── NumberBoxDemo │ ├── NumberBoxDemo.dpr │ ├── NumberBoxDemo.dproj │ ├── NumberBoxDemo.res │ ├── NumberBoxDemo_Unit1.dfm │ └── NumberBoxDemo_Unit1.pas ├── Sydney1042Demos.groupproj └── VersionInfo │ ├── VersionInfo.dpr │ ├── VersionInfo.dproj │ ├── VersionInfo.res │ ├── VersionInfo_Main.fmx │ └── VersionInfo_Main.pas ├── 11-demos ├── RichEdit │ ├── overview.rtf │ ├── reabout.dfm │ ├── reabout.pas │ ├── remain.dfm │ ├── remain.pas │ ├── richedit.dpr │ ├── richedit.dproj │ ├── richedit.res │ └── richedit_Icon.ico ├── TTreeView │ ├── TreeCheck.dpr │ ├── TreeCheck.dproj │ ├── TreeCheck.res │ ├── TreeMain.dfm │ ├── TreeMain.pas │ ├── black border.png │ ├── black box.png │ ├── blue dot.png │ ├── green heavy chec.png │ ├── green light check.png │ ├── red x.png │ └── words.db ├── TZipFile │ ├── RADZipper_Delphi.dpr │ ├── RADZipper_Delphi.dproj │ ├── RADZipper_Delphi.res │ ├── ZipMain.fmx │ └── ZipMain.pas ├── Win11Corners │ ├── Win11Corners.dpr │ ├── Win11Corners.dproj │ ├── Win11Corners.res │ ├── Win11CornersMain.dfm │ ├── Win11CornersMain.pas │ └── readme.md └── Wsl2 │ ├── HelloWsl2.dpr │ ├── HelloWsl2.dproj │ ├── HelloWsl2.res │ ├── Wsl2Demos.groupproj │ ├── Wsl2Gui.dpr │ ├── Wsl2Gui.dproj │ ├── Wsl2Gui.res │ ├── Wsl2GuiMain.fmx │ └── Wsl2GuiMain.pas └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sln binary 2 | *.pdf binary 3 | *.docx binary -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Uncomment these types if you want even more clean repository. But be careful. 2 | # It can make harm to an existing project source. Read explanations below. 3 | # 4 | # Resource files are binaries containing manifest, project icon and version info. 5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. 6 | #*.res 7 | # 8 | # Type library file (binary). In old Delphi versions it should be stored. 9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored. 10 | #*.tlb 11 | # 12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7. 13 | # Uncomment this if you are not using diagrams or use newer Delphi version. 14 | #*.ddp 15 | # 16 | # Visual LiveBindings file. Added in Delphi XE2. 17 | # Uncomment this if you are not using LiveBindings Designer. 18 | #*.vlb 19 | # 20 | # Deployment Manager configuration file for your project. Added in Delphi XE2. 21 | # Uncomment this if it is not mobile development and you do not use remote debug feature. 22 | #*.deployproj 23 | # 24 | # C++ object files produced when C/C++ Output file generation is configured. 25 | # Uncomment this if you are not using external objects (zlib library for example). 26 | #*.obj 27 | # 28 | 29 | # Delphi compiler-generated binaries (safe to delete) 30 | *.exe 31 | *.dll 32 | *.bpl 33 | *.bpi 34 | *.dcp 35 | *.so 36 | *.apk 37 | *.drc 38 | *.map 39 | *.dres 40 | *.rsm 41 | *.tds 42 | *.dcu 43 | *.lib 44 | *.a 45 | *.o 46 | *.ocx 47 | 48 | # Delphi autogenerated files (duplicated info) 49 | *.cfg 50 | *.hpp 51 | *Resource.rc 52 | 53 | # Delphi local files (user-specific info) 54 | *.local 55 | *.identcache 56 | *.projdata 57 | *.tvsconfig 58 | *.dsk 59 | 60 | # Delphi history and backups 61 | __history/ 62 | __recovery/ 63 | *.~* 64 | 65 | *.delphilsp.json 66 | **/Win64/Release/** 67 | **/Win32/Release/** 68 | **/Win64/Debug/** 69 | **/Win32/Debug/** 70 | *.deployproj 71 | *.template.xml 72 | *.templateOSX.xml 73 | 74 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi) 75 | *.stat 76 | 77 | # Boss dependency manager vendor folder https://github.com/HashLoad/boss 78 | modules/ 79 | 80 | *.vlb 81 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "demos/RADStudio10.4Demos"] 2 | path = demos/_ShippingSamples/ 3 | url = https://github.com/Embarcadero/RADStudio10.4Demos.git 4 | -------------------------------------------------------------------------------- /10.4-demos/DBGrid_DBNavigator_Demo/DBGrid_DBNavigator_Demo.dpr: -------------------------------------------------------------------------------- 1 | program DBGrid_DBNavigator_Demo; 2 | 3 | uses 4 | Vcl.Forms, 5 | DBGrid_DBNavigator_MainUnit in 'DBGrid_DBNavigator_MainUnit.pas' {DBGrid_DBNavigator_Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TDBGrid_DBNavigator_Form1, DBGrid_DBNavigator_Form1); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /10.4-demos/DBGrid_DBNavigator_Demo/DBGrid_DBNavigator_Demo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/DBGrid_DBNavigator_Demo/DBGrid_DBNavigator_Demo.res -------------------------------------------------------------------------------- /10.4-demos/DBGrid_DBNavigator_Demo/DBGrid_DBNavigator_MainUnit.dfm: -------------------------------------------------------------------------------- 1 | object DBGrid_DBNavigator_Form1: TDBGrid_DBNavigator_Form1 2 | Left = 0 3 | Top = 0 4 | Caption = 'VCL DBGrid && DBNavigator High-DPI Support' 5 | ClientHeight = 239 6 | ClientWidth = 467 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged 16 | OnCreate = FormCreate 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object Label1: TLabel 20 | Left = 0 21 | Top = 13 22 | Width = 467 23 | Height = 13 24 | Margins.Left = 10 25 | Margins.Top = 10 26 | Margins.Right = 10 27 | Margins.Bottom = 10 28 | Align = alTop 29 | Alignment = taCenter 30 | Caption = 'VCL DBGrid && DBNavigator High-DPI Support' 31 | ExplicitLeft = 21 32 | ExplicitTop = 8 33 | ExplicitWidth = 212 34 | end 35 | object Label2: TLabel 36 | Left = 0 37 | Top = 26 38 | Width = 467 39 | Height = 13 40 | Margins.Left = 10 41 | Margins.Top = 10 42 | Margins.Right = 10 43 | Margins.Bottom = 10 44 | Align = alTop 45 | Caption = ' ' 46 | ExplicitTop = 13 47 | ExplicitWidth = 3 48 | end 49 | object Label3: TLabel 50 | Left = 0 51 | Top = 0 52 | Width = 467 53 | Height = 13 54 | Margins.Left = 10 55 | Margins.Top = 10 56 | Margins.Right = 10 57 | Margins.Bottom = 10 58 | Align = alTop 59 | Caption = ' ' 60 | ExplicitLeft = 15 61 | end 62 | object DBNavigator1: TDBNavigator 63 | Left = 0 64 | Top = 39 65 | Width = 467 66 | Height = 33 67 | Margins.Left = 10 68 | Margins.Top = 10 69 | Margins.Right = 10 70 | Margins.Bottom = 10 71 | DataSource = DataSource1 72 | VisibleButtons = [nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel, nbRefresh, nbApplyUpdates, nbCancelUpdates] 73 | Align = alTop 74 | TabOrder = 0 75 | ExplicitLeft = 21 76 | ExplicitTop = 29 77 | ExplicitWidth = 396 78 | end 79 | object DBGrid1: TDBGrid 80 | Left = 0 81 | Top = 72 82 | Width = 467 83 | Height = 167 84 | Margins.Left = 10 85 | Margins.Top = 10 86 | Margins.Right = 10 87 | Margins.Bottom = 10 88 | Align = alClient 89 | DataSource = DataSource1 90 | Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgMultiSelect, dgTitleClick, dgTitleHotTrack] 91 | TabOrder = 1 92 | TitleFont.Charset = DEFAULT_CHARSET 93 | TitleFont.Color = clWindowText 94 | TitleFont.Height = -11 95 | TitleFont.Name = 'Tahoma' 96 | TitleFont.Style = [] 97 | Columns = < 98 | item 99 | Expanded = False 100 | FieldName = 'Field1' 101 | Width = 130 102 | Visible = True 103 | end 104 | item 105 | Expanded = False 106 | FieldName = 'Field2' 107 | Width = 200 108 | Visible = True 109 | end> 110 | end 111 | object ClientDataSet1: TClientDataSet 112 | PersistDataPacket.Data = { 113 | 500000009619E0BD010000001800000002000000000003000000500006466965 114 | 6C64310100490000000100055749445448020002001400064669656C64320100 115 | 4900000001000557494454480200020014000000} 116 | Active = True 117 | Aggregates = <> 118 | FieldDefs = < 119 | item 120 | Name = 'Field1' 121 | DataType = ftString 122 | Size = 20 123 | end 124 | item 125 | Name = 'Field2' 126 | DataType = ftString 127 | Size = 20 128 | end> 129 | IndexDefs = <> 130 | Params = <> 131 | StoreDefs = True 132 | Left = 48 133 | Top = 130 134 | end 135 | object DataSource1: TDataSource 136 | DataSet = ClientDataSet1 137 | Left = 156 138 | Top = 130 139 | end 140 | end 141 | -------------------------------------------------------------------------------- /10.4-demos/DBGrid_DBNavigator_Demo/DBGrid_DBNavigator_MainUnit.pas: -------------------------------------------------------------------------------- 1 | unit DBGrid_DBNavigator_MainUnit; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Themes, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Grids, Vcl.ComCtrls, 8 | Vcl.Tabs, Vcl.Menus, System.Actions, Vcl.ActnList, Vcl.ActnCtrls, 9 | Vcl.PlatformDefaultStyleActnCtrls, Vcl.ActnPopup, Vcl.ToolWin, Vcl.ActnMan, 10 | Vcl.ActnMenus, Data.DB, Datasnap.DBClient, Vcl.DBGrids, Vcl.ExtCtrls, 11 | Vcl.DBCtrls, Vcl.Buttons, Vcl.Mask, Vcl.DBCGrids, System.ImageList, 12 | Vcl.ImgList, Vcl.VirtualImageList; 13 | 14 | type 15 | TDBGrid_DBNavigator_Form1 = class(TForm) 16 | DBNavigator1: TDBNavigator; 17 | DBGrid1: TDBGrid; 18 | ClientDataSet1: TClientDataSet; 19 | DataSource1: TDataSource; 20 | Label1: TLabel; 21 | Label2: TLabel; 22 | Label3: TLabel; 23 | procedure FormCreate(Sender: TObject); 24 | procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 25 | NewDPI: Integer); 26 | private 27 | procedure UpdateCaption; 28 | { Private declarations } 29 | public 30 | { Public declarations } 31 | end; 32 | 33 | var 34 | DBGrid_DBNavigator_Form1: TDBGrid_DBNavigator_Form1; 35 | 36 | implementation 37 | 38 | {$R *.dfm} 39 | 40 | procedure TDBGrid_DBNavigator_Form1.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 41 | NewDPI: Integer); 42 | begin 43 | UpdateCaption; 44 | end; 45 | 46 | procedure TDBGrid_DBNavigator_Form1.UpdateCaption; 47 | begin 48 | Self.Caption := 'TDBGrid - TDBNavigator - DPI: ' + IntToStr(Round(Self.ScaleFactor * 100)) + '%'; 49 | end; 50 | 51 | procedure TDBGrid_DBNavigator_Form1.FormCreate(Sender: TObject); 52 | var 53 | I: Integer; 54 | begin 55 | UpdateCaption; 56 | ClientDataSet1.Open; 57 | for I := 1 to 10 do 58 | ClientDataSet1.InsertRecord(['Item' + IntToStr(I), 'Value' + IntToStr(I)]); 59 | ClientDataSet1.First; 60 | end; 61 | 62 | end. 63 | -------------------------------------------------------------------------------- /10.4-demos/DynamicStyles.txt: -------------------------------------------------------------------------------- 1 | uses 2 | Vcl.Themes; 3 | 4 | procedure TForm1.FormCreate(Sender: TObject); 5 | begin 6 | ListBox1.Items.Clear; 7 | ListBox1.Items.AddStrings(TStyleManager.StyleNames); 8 | end; 9 | 10 | procedure TForm1.ListBox1Click(Sender: TObject); 11 | begin 12 | if ListBox1.ItemIndex > -1 then 13 | begin 14 | ListBox1.StyleName := ListBox1.Items[ListBox1.ItemIndex]; 15 | Panel1.StyleName := ListBox1.Items[ListBox1.ItemIndex]; 16 | end; 17 | end; 18 | 19 | procedure TForm1.Button1DragOver(Sender, Source: TObject; X, Y: Integer; 20 | State: TDragState; var Accept: Boolean); 21 | begin 22 | Accept := (Sender = ListBox1) and (ListBox1.ItemIndex > 0); 23 | end; 24 | 25 | procedure TForm1.Button1DragDrop(Sender, Source: TObject; X, Y: Integer); 26 | begin 27 | if (Source = ListBox1) and (ListBox1.ItemIndex > 0) then 28 | (Sender as TControl).StyleName := 29 | ListBox1.Items[ListBox1.ItemIndex]; 30 | end; 31 | 32 | procedure TForm1.ListBox1DblClick(Sender: TObject); 33 | begin 34 | if ListBox1.ItemIndex > -1 then 35 | Self.StyleName := ListBox1.Items[ListBox1.ItemIndex]; 36 | end; 37 | -------------------------------------------------------------------------------- /10.4-demos/Dynamic_Per_Conrol_Styles/DynamicStyles.dpr: -------------------------------------------------------------------------------- 1 | program DynamicStyles; 2 | 3 | uses 4 | Vcl.Forms, 5 | Vcl.Themes, 6 | Vcl.Styles, 7 | DynamicStylesMain in 'DynamicStylesMain.pas' {Form1}; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.HelpFile := 'No help for you'; 15 | Application.Title := 'Warning, may induce seizures!'; 16 | Application.CreateForm(TForm1, Form1); 17 | TStyleManager.TrySetStyle('Aqua Light Slate'); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /10.4-demos/Dynamic_Per_Conrol_Styles/DynamicStyles.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/Dynamic_Per_Conrol_Styles/DynamicStyles.res -------------------------------------------------------------------------------- /10.4-demos/Dynamic_Per_Conrol_Styles/DynamicStylesMain.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Changing Per Control Styles at Runtime' 5 | ClientHeight = 449 6 | ClientWidth = 538 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Panel1: TPanel 18 | Left = 0 19 | Top = 0 20 | Width = 384 21 | Height = 430 22 | Align = alClient 23 | BevelOuter = bvNone 24 | Caption = ' ' 25 | TabOrder = 1 26 | OnDragDrop = Button1DragDrop 27 | OnDragOver = Button1DragOver 28 | object Label1: TLabel 29 | Left = 8 30 | Top = 162 31 | Width = 31 32 | Height = 13 33 | Caption = 'Label1' 34 | OnDragDrop = Button1DragDrop 35 | OnDragOver = Button1DragOver 36 | end 37 | object Label2: TLabel 38 | Left = 0 39 | Top = 0 40 | Width = 384 41 | Height = 25 42 | Align = alTop 43 | Alignment = taCenter 44 | Caption = 'Drag a style from the left onto a control' 45 | Font.Charset = DEFAULT_CHARSET 46 | Font.Color = clWindowText 47 | Font.Height = -21 48 | Font.Name = 'Tahoma' 49 | Font.Style = [] 50 | ParentFont = False 51 | OnDragDrop = Button1DragDrop 52 | OnDragOver = Button1DragOver 53 | ExplicitWidth = 374 54 | end 55 | object BitBtn1: TBitBtn 56 | Left = 8 57 | Top = 127 58 | Width = 75 59 | Height = 25 60 | Caption = 'BitBtn1' 61 | TabOrder = 0 62 | OnDragDrop = Button1DragDrop 63 | OnDragOver = Button1DragOver 64 | end 65 | object Button1: TButton 66 | Left = 212 67 | Top = 95 68 | Width = 75 69 | Height = 25 70 | Caption = 'Button1' 71 | TabOrder = 1 72 | OnDragDrop = Button1DragDrop 73 | OnDragOver = Button1DragOver 74 | end 75 | object CheckBox1: TCheckBox 76 | Left = 113 77 | Top = 206 78 | Width = 93 79 | Height = 17 80 | Caption = 'CheckBox1' 81 | TabOrder = 2 82 | OnDragDrop = Button1DragDrop 83 | OnDragOver = Button1DragOver 84 | end 85 | object ComboBox1: TComboBox 86 | Left = 212 87 | Top = 36 88 | Width = 145 89 | Height = 21 90 | TabOrder = 3 91 | Text = 'ComboBox1' 92 | OnDragDrop = Button1DragDrop 93 | OnDragOver = Button1DragOver 94 | end 95 | object DateTimePicker1: TDateTimePicker 96 | Left = 183 97 | Top = 229 98 | Width = 145 99 | Height = 21 100 | Date = 43976.000000000000000000 101 | Time = 0.776702326387749100 102 | TabOrder = 4 103 | OnDragDrop = Button1DragDrop 104 | OnDragOver = Button1DragOver 105 | end 106 | object Edit1: TEdit 107 | Left = 8 108 | Top = 181 109 | Width = 198 110 | Height = 21 111 | TabOrder = 5 112 | Text = 'Edit1' 113 | OnDragDrop = Button1DragDrop 114 | OnDragOver = Button1DragOver 115 | end 116 | object ListBox2: TListBox 117 | Left = 212 118 | Top = 126 119 | Width = 121 120 | Height = 97 121 | ItemHeight = 13 122 | TabOrder = 6 123 | OnDragDrop = Button1DragDrop 124 | OnDragOver = Button1DragOver 125 | end 126 | object MaskEdit1: TMaskEdit 127 | Left = 8 128 | Top = 266 129 | Width = 145 130 | Height = 21 131 | TabOrder = 7 132 | Text = 'MaskEdit1' 133 | OnDragDrop = Button1DragDrop 134 | OnDragOver = Button1DragOver 135 | end 136 | object Memo1: TMemo 137 | Left = 8 138 | Top = 36 139 | Width = 185 140 | Height = 89 141 | Lines.Strings = ( 142 | 'Memo1') 143 | TabOrder = 8 144 | OnDragDrop = Button1DragDrop 145 | OnDragOver = Button1DragOver 146 | end 147 | object ProgressBar1: TProgressBar 148 | Left = 183 149 | Top = 270 150 | Width = 150 151 | Height = 17 152 | TabOrder = 9 153 | OnDragDrop = Button1DragDrop 154 | OnDragOver = Button1DragOver 155 | end 156 | object RadioButton1: TRadioButton 157 | Left = 8 158 | Top = 208 159 | Width = 89 160 | Height = 17 161 | Caption = 'RadioButton1' 162 | TabOrder = 10 163 | OnDragDrop = Button1DragDrop 164 | OnDragOver = Button1DragOver 165 | end 166 | object ScrollBar1: TScrollBar 167 | Left = 8 168 | Top = 231 169 | Width = 145 170 | Height = 17 171 | PageSize = 0 172 | TabOrder = 11 173 | OnDragDrop = Button1DragDrop 174 | OnDragOver = Button1DragOver 175 | end 176 | object SearchBox1: TSearchBox 177 | Left = 212 178 | Top = 63 179 | Width = 145 180 | Height = 21 181 | TabOrder = 12 182 | Text = 'SearchBox1' 183 | OnDragDrop = Button1DragDrop 184 | OnDragOver = Button1DragOver 185 | end 186 | object StringGrid1: TStringGrid 187 | Left = 8 188 | Top = 304 189 | Width = 353 190 | Height = 120 191 | TabOrder = 13 192 | OnDragDrop = Button1DragDrop 193 | OnDragOver = Button1DragOver 194 | end 195 | object ToggleSwitch1: TToggleSwitch 196 | Left = 113 197 | Top = 131 198 | Width = 72 199 | Height = 20 200 | TabOrder = 14 201 | OnDragDrop = Button1DragDrop 202 | OnDragOver = Button1DragOver 203 | end 204 | object TrackBar2: TTrackBar 205 | Left = 347 206 | Top = 100 207 | Width = 31 208 | Height = 187 209 | Orientation = trVertical 210 | TabOrder = 15 211 | OnDragDrop = Button1DragDrop 212 | OnDragOver = Button1DragOver 213 | end 214 | end 215 | object StatusBar1: TStatusBar 216 | Left = 0 217 | Top = 430 218 | Width = 538 219 | Height = 19 220 | Panels = <> 221 | OnDragDrop = Button1DragDrop 222 | OnDragOver = Button1DragOver 223 | end 224 | object Panel2: TPanel 225 | Left = 384 226 | Top = 0 227 | Width = 154 228 | Height = 430 229 | Align = alRight 230 | BevelOuter = bvNone 231 | Caption = 'Panel2' 232 | TabOrder = 2 233 | object ListBox1: TListBox 234 | Left = 0 235 | Top = 0 236 | Width = 154 237 | Height = 376 238 | Align = alClient 239 | DragMode = dmAutomatic 240 | ItemHeight = 13 241 | Items.Strings = ( 242 | '') 243 | TabOrder = 0 244 | OnClick = ListBox1Click 245 | OnDblClick = ListBox1DblClick 246 | end 247 | object Panel3: TPanel 248 | Left = 0 249 | Top = 376 250 | Width = 154 251 | Height = 54 252 | Align = alBottom 253 | BevelOuter = bvNone 254 | Caption = ' ' 255 | TabOrder = 1 256 | object BitBtn2: TBitBtn 257 | Left = 41 258 | Top = 0 259 | Width = 41 260 | Height = 25 261 | Align = alLeft 262 | Caption = 'Reset' 263 | TabOrder = 0 264 | OnClick = BitBtn2Click 265 | end 266 | object CheckBox2: TCheckBox 267 | Left = 89 268 | Top = 5 269 | Width = 58 270 | Height = 17 271 | Caption = 'Psycho' 272 | TabOrder = 1 273 | end 274 | object BitBtn3: TBitBtn 275 | Left = 0 276 | Top = 0 277 | Width = 41 278 | Height = 25 279 | Align = alLeft 280 | Caption = ' Rand' 281 | TabOrder = 2 282 | OnClick = BitBtn3Click 283 | end 284 | object TrackBar1: TTrackBar 285 | Left = 0 286 | Top = 25 287 | Width = 154 288 | Height = 29 289 | Align = alBottom 290 | Max = 100 291 | Min = 1 292 | PageSize = 10 293 | Frequency = 10 294 | Position = 50 295 | TabOrder = 3 296 | OnChange = TrackBar1Change 297 | end 298 | end 299 | end 300 | object Timer1: TTimer 301 | OnTimer = Timer1Timer 302 | Left = 456 303 | Top = 320 304 | end 305 | end 306 | -------------------------------------------------------------------------------- /10.4-demos/Dynamic_Per_Conrol_Styles/DynamicStylesMain.pas: -------------------------------------------------------------------------------- 1 | unit DynamicStylesMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.WinXCtrls, 8 | Vcl.Grids, Vcl.Mask, Vcl.Buttons, Vcl.ComCtrls, Vcl.ToolWin, Vcl.ExtCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | ListBox1: TListBox; 13 | Button1: TButton; 14 | Label1: TLabel; 15 | Edit1: TEdit; 16 | Memo1: TMemo; 17 | CheckBox1: TCheckBox; 18 | RadioButton1: TRadioButton; 19 | ListBox2: TListBox; 20 | ComboBox1: TComboBox; 21 | ScrollBar1: TScrollBar; 22 | BitBtn1: TBitBtn; 23 | MaskEdit1: TMaskEdit; 24 | StringGrid1: TStringGrid; 25 | ToggleSwitch1: TToggleSwitch; 26 | SearchBox1: TSearchBox; 27 | StatusBar1: TStatusBar; 28 | DateTimePicker1: TDateTimePicker; 29 | ProgressBar1: TProgressBar; 30 | Panel1: TPanel; 31 | Label2: TLabel; 32 | Panel2: TPanel; 33 | Panel3: TPanel; 34 | BitBtn2: TBitBtn; 35 | CheckBox2: TCheckBox; 36 | BitBtn3: TBitBtn; 37 | Timer1: TTimer; 38 | TrackBar1: TTrackBar; 39 | TrackBar2: TTrackBar; 40 | procedure ListBox1Click(Sender: TObject); 41 | procedure Button1DragOver(Sender, Source: TObject; X, Y: Integer; 42 | State: TDragState; var Accept: Boolean); 43 | procedure Button1DragDrop(Sender, Source: TObject; X, Y: Integer); 44 | procedure FormCreate(Sender: TObject); 45 | procedure BitBtn3Click(Sender: TObject); 46 | procedure BitBtn2Click(Sender: TObject); 47 | procedure TrackBar1Change(Sender: TObject); 48 | procedure Timer1Timer(Sender: TObject); 49 | procedure ListBox1DblClick(Sender: TObject); 50 | private 51 | { Private declarations } 52 | procedure ChangeRandom; 53 | public 54 | { Public declarations } 55 | end; 56 | 57 | var 58 | Form1: TForm1; 59 | 60 | implementation 61 | 62 | {$R *.dfm} 63 | 64 | uses 65 | Vcl.Themes; 66 | 67 | procedure TForm1.BitBtn2Click(Sender: TObject); 68 | begin 69 | for var i := 0 to Panel1.ControlCount-1 do 70 | Panel1.Controls[i].StyleName := ''; 71 | CheckBox2.Checked := false; 72 | end; 73 | 74 | procedure TForm1.BitBtn3Click(Sender: TObject); 75 | begin 76 | ChangeRandom; 77 | end; 78 | 79 | procedure TForm1.Button1DragDrop(Sender, Source: TObject; X, Y: Integer); 80 | begin 81 | if (Source = ListBox1) and (ListBox1.ItemIndex > -1) then 82 | (Sender as TControl).StyleName := 83 | ListBox1.Items[ListBox1.ItemIndex]; 84 | end; 85 | 86 | procedure TForm1.Button1DragOver(Sender, Source: TObject; X, Y: Integer; 87 | State: TDragState; var Accept: Boolean); 88 | begin 89 | Accept := (Source = ListBox1) and (ListBox1.ItemIndex > -1); 90 | end; 91 | 92 | procedure TForm1.ChangeRandom; 93 | begin 94 | ListBox1.ItemIndex := Random(ListBox1.Items.Count); 95 | Panel1.Controls[Random(Panel1.ControlCount)].StyleName := 96 | ListBox1.Items[ListBox1.ItemIndex]; 97 | end; 98 | 99 | procedure TForm1.FormCreate(Sender: TObject); 100 | begin 101 | ListBox1.Items.Clear; 102 | ListBox1.Items.AddStrings(TStyleManager.StyleNames); 103 | end; 104 | 105 | procedure TForm1.ListBox1Click(Sender: TObject); 106 | begin 107 | if ListBox1.ItemIndex > -1 then 108 | begin 109 | ListBox1.StyleName := ListBox1.Items[ListBox1.ItemIndex]; 110 | end; 111 | end; 112 | 113 | procedure TForm1.ListBox1DblClick(Sender: TObject); 114 | begin 115 | if ListBox1.ItemIndex > -1 then 116 | begin 117 | Self.StyleName := ListBox1.Items[ListBox1.ItemIndex]; 118 | end; 119 | end; 120 | 121 | procedure TForm1.Timer1Timer(Sender: TObject); 122 | begin 123 | ProgressBar1.StepIt; 124 | if CheckBox2.Checked then 125 | ChangeRandom; 126 | end; 127 | 128 | procedure TForm1.TrackBar1Change(Sender: TObject); 129 | begin 130 | Timer1.Interval := TrackBar1.Position; 131 | end; 132 | 133 | end. 134 | -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/EmojiDemo-DesignTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/EmojiDemo/EmojiDemo-DesignTime.png -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/EmojiDemo-Running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/EmojiDemo/EmojiDemo-Running.png -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/EmojiDemo.deployproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 12 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | EmojiDemo\ 13 | EmojiDemo.exe 14 | ProjectOutput 15 | 0 16 | 17 | 18 | True 19 | True 20 | 21 | 22 | 23 | 24 | EmojiDemo\ 25 | EmojiDemo 26 | ProjectOutput 27 | 1 28 | 29 | 30 | True 31 | True 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/EmojiDemo.dpr: -------------------------------------------------------------------------------- 1 | program EmojiDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | MainFormU in 'MainFormU.pas' {Form6}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm6, Form6); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/EmojiDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/EmojiDemo/EmojiDemo.res -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/MainFormU.fmx: -------------------------------------------------------------------------------- 1 | object Form6: TForm6 2 | Left = 0 3 | Top = 0 4 | Caption = 'FireMonkey '#55357#56613#55357#56338' Emoji' 5 | ClientHeight = 565 6 | ClientWidth = 1038 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | DesignerMasterStyle = 0 11 | object TabControl1: TTabControl 12 | Align = Client 13 | Size.Width = 1038.000000000000000000 14 | Size.Height = 565.000000000000000000 15 | Size.PlatformDefault = False 16 | TabIndex = 0 17 | TabOrder = 1 18 | TabPosition = PlatformDefault 19 | Sizes = ( 20 | 1038s 21 | 539s 22 | 1038s 23 | 539s) 24 | object TabItem1: TTabItem 25 | CustomIcon = < 26 | item 27 | end> 28 | IsSelected = True 29 | Size.Width = 50.000000000000000000 30 | Size.Height = 26.000000000000000000 31 | Size.PlatformDefault = False 32 | StyleLookup = '' 33 | TabOrder = 0 34 | Text = 'Emoji' 35 | ExplicitSize.cx = 50.000000000000000000 36 | ExplicitSize.cy = 26.000000000000000000 37 | object Label1: TLabel 38 | Align = Top 39 | StyledSettings = [Family, Style, FontColor] 40 | Size.Width = 1038.000000000000000000 41 | Size.Height = 41.000000000000000000 42 | Size.PlatformDefault = False 43 | TextSettings.Font.Size = 32.000000000000000000 44 | TextSettings.HorzAlign = Center 45 | Text = 'RAD Studio 10.4 - Emoji Support Demo' 46 | TabOrder = 0 47 | end 48 | object Memo1: TMemo 49 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 50 | DataDetectorTypes = [] 51 | DisableMouseWheel = True 52 | Lines.Strings = ( 53 | #9977#65039#8205#9792#65039#9977#65039#8205#9794#65039' Delphi Rocks! ' 54 | #55357#56613#55357#56338' FireMonkey Rocks too!' 55 | #55357#56359'Also on Linux!') 56 | StyledSettings = [Family, Style, FontColor] 57 | TextSettings.Font.Size = 72.000000000000000000 58 | Align = Client 59 | Margins.Left = 10.000000000000000000 60 | Margins.Top = 10.000000000000000000 61 | Margins.Right = 10.000000000000000000 62 | Margins.Bottom = 10.000000000000000000 63 | Padding.Left = 10.000000000000000000 64 | Padding.Top = 10.000000000000000000 65 | Padding.Right = 10.000000000000000000 66 | Padding.Bottom = 10.000000000000000000 67 | Size.Width = 1018.000000000000000000 68 | Size.Height = 342.000000000000000000 69 | Size.PlatformDefault = False 70 | TabOrder = 1 71 | Viewport.Width = 1014.000000000000000000 72 | Viewport.Height = 338.000000000000000000 73 | end 74 | object Panel1: TPanel 75 | Align = Bottom 76 | Padding.Left = 20.000000000000000000 77 | Padding.Top = 20.000000000000000000 78 | Padding.Right = 20.000000000000000000 79 | Padding.Bottom = 20.000000000000000000 80 | Position.Y = 403.000000000000000000 81 | Size.Width = 1038.000000000000000000 82 | Size.Height = 136.000000000000000000 83 | Size.PlatformDefault = False 84 | TabOrder = 2 85 | object Button2: TButton 86 | Align = Left 87 | StyledSettings = [Family, Style, FontColor] 88 | Position.X = 20.000000000000000000 89 | Position.Y = 20.000000000000000000 90 | Size.Width = 300.000000000000000000 91 | Size.Height = 96.000000000000000000 92 | Size.PlatformDefault = False 93 | Text = #55356#57266' Roll Dice' 94 | TextSettings.Font.Size = 48.000000000000000000 95 | end 96 | object Button3: TButton 97 | Align = Left 98 | StyledSettings = [Family, Style, FontColor] 99 | Margins.Left = 10.000000000000000000 100 | Position.X = 330.000000000000000000 101 | Position.Y = 20.000000000000000000 102 | Size.Width = 300.000000000000000000 103 | Size.Height = 96.000000000000000000 104 | Size.PlatformDefault = False 105 | Text = #55356#57256' Paint!' 106 | TextSettings.Font.Size = 48.000000000000000000 107 | end 108 | object Button4: TButton 109 | Align = Left 110 | StyledSettings = [Family, Style, FontColor] 111 | Margins.Left = 10.000000000000000000 112 | Position.X = 640.000000000000000000 113 | Position.Y = 20.000000000000000000 114 | Size.Width = 369.000000000000000000 115 | Size.Height = 96.000000000000000000 116 | Size.PlatformDefault = False 117 | Text = #55356#57272' Let'#39's Play!' 118 | TextSettings.Font.Size = 48.000000000000000000 119 | end 120 | end 121 | end 122 | object TabItem2: TTabItem 123 | CustomIcon = < 124 | item 125 | end> 126 | IsSelected = False 127 | Size.Width = 43.000000000000000000 128 | Size.Height = 26.000000000000000000 129 | Size.PlatformDefault = False 130 | StyleLookup = '' 131 | TabOrder = 0 132 | Text = 'ZWJ' 133 | ExplicitSize.cx = 43.000000000000000000 134 | ExplicitSize.cy = 26.000000000000000000 135 | object Label2: TLabel 136 | Align = Top 137 | StyledSettings = [Family, Style, FontColor] 138 | Size.Width = 1038.000000000000000000 139 | Size.Height = 97.000000000000000000 140 | Size.PlatformDefault = False 141 | TextSettings.Font.Size = 32.000000000000000000 142 | TextSettings.HorzAlign = Center 143 | Text = 144 | 'An Emoji ZWJ Sequence is a specific combination of emojis, join' + 145 | 'ed with a Zero Width Joiner character, which display as a single' + 146 | ' emoji.' 147 | TabOrder = 2 148 | end 149 | object Label3: TLabel 150 | Align = Top 151 | StyledSettings = [Family, Style, FontColor] 152 | Position.Y = 97.000000000000000000 153 | Size.Width = 1038.000000000000000000 154 | Size.Height = 73.000000000000000000 155 | Size.PlatformDefault = False 156 | TextSettings.Font.Size = 24.000000000000000000 157 | TextSettings.HorzAlign = Center 158 | Text = 159 | 'Zero Width Joiner (Codepoint U+200D), pronounced "zwidge", is no' + 160 | 't an emoji and has no appearance by itself. This is an invisible' + 161 | ' character when used alone.' 162 | TabOrder = 0 163 | end 164 | object Memo2: TMemo 165 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 166 | DataDetectorTypes = [] 167 | DisableMouseWheel = True 168 | Lines.Strings = ( 169 | #55357#56424'Man, '#55357#56425' Woman, '#55357#56423' Girl, '#55357#56422' Boy' 170 | #55357#56424#8205#55357#56425#8205#55357#56423#8205#55357#56422#8205' Family: Man, Woman, Girl, Boy' 171 | #55357#56424#8205#55357#56425#8205#55357#56422' Family: Man, Woman, Boy' 172 | #55357#56424#8205#55357#56425#8205#55357#56423' Family: Man, Woman, Girl' 173 | #55357#56425#8205#55357#56425#8205#55357#56423#8205#55357#56423' Family: Woman, Woman, Girl, Girl') 174 | StyledSettings = [Family, Style, FontColor] 175 | TextSettings.Font.Size = 48.000000000000000000 176 | Align = Client 177 | Margins.Left = 10.000000000000000000 178 | Margins.Top = 10.000000000000000000 179 | Margins.Right = 10.000000000000000000 180 | Margins.Bottom = 10.000000000000000000 181 | Padding.Left = 10.000000000000000000 182 | Padding.Top = 10.000000000000000000 183 | Padding.Right = 10.000000000000000000 184 | Padding.Bottom = 10.000000000000000000 185 | Size.Width = 1018.000000000000000000 186 | Size.Height = 349.000000000000000000 187 | Size.PlatformDefault = False 188 | TabOrder = 1 189 | Viewport.Width = 1014.000000000000000000 190 | Viewport.Height = 345.000000000000000000 191 | end 192 | end 193 | end 194 | end 195 | -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/MainFormU.pas: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------- 2 | // Demo written by Daniele Teti 3 | //--------------------------------------------------------------- 4 | unit MainFormU; 5 | 6 | interface 7 | 8 | uses 9 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 10 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Memo.Types, 11 | FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls, 12 | FMX.TabControl; 13 | 14 | type 15 | TForm6 = class(TForm) 16 | Memo1: TMemo; 17 | Panel1: TPanel; 18 | Button2: TButton; 19 | Button3: TButton; 20 | Button4: TButton; 21 | Label1: TLabel; 22 | TabControl1: TTabControl; 23 | TabItem1: TTabItem; 24 | TabItem2: TTabItem; 25 | Label2: TLabel; 26 | Label3: TLabel; 27 | Memo2: TMemo; 28 | private 29 | { Private declarations } 30 | public 31 | { Public declarations } 32 | end; 33 | 34 | var 35 | Form6: TForm6; 36 | 37 | implementation 38 | 39 | {$R *.fmx} 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /10.4-demos/EmojiDemo/readme.md: -------------------------------------------------------------------------------- 1 | Demo provided by [Daniele Teti](www.danieleteti.it) 2 | 3 | # EmojiDemo 4 | 5 | Simple no-code project which shows FireMonkey support for Emoji and [Emoji ZWJ Sequences](https://emojipedia.org/emoji-zwj-sequence/). 6 | 7 | An Emoji ZWJ Sequence is a specific combination of emojis, joined with a [Zero Width Joiner](https://emojipedia.org/zero-width-joiner/) character, which display as a single emoji. The Zero Width Joiner (Codepoint U+200D), pronounced "zwidge", is not an emoji and has no appearance by itself. This is an invisible character when used alone. 8 | 9 | ## Examples: 10 | 11 | # ♀️ + ⛹️= ⛹️‍♀️ 12 | 13 | Individual emoji 👨Man, 👩 Woman, 👧 Girl, 👦 Boy 14 | 15 | Combined as ZWJ Sequences: 16 | 17 | * 👨‍👩‍👧‍👦‍ Family: Man, Woman, Girl, Boy 18 | * 👨‍👩‍👦 Family: Man, Woman, Boy 19 | * 👨‍👩‍👧 Family: Man, Woman, Girl 20 | * 👩‍👩‍👧‍👧 Family: Woman, Woman, Girl, Girl 21 | 22 | -------------------------------------------------------------------------------- /10.4-demos/HealthSystem-PerControlVclStyles/readme.md: -------------------------------------------------------------------------------- 1 | Demonstration of the Per Control VCL Stytles in a simple Health System application 2 | -------------------------------------------------------------------------------- /10.4-demos/HealthSystem/HealthSystem.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/HealthSystem/HealthSystem.res -------------------------------------------------------------------------------- /10.4-demos/HealthSystem/HealthSystem_Unit1.pas: -------------------------------------------------------------------------------- 1 | unit HealthSystem_Unit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.jpeg, 8 | Vcl.ExtCtrls, Vcl.WinXCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | RelativePanel1: TRelativePanel; 13 | Image1: TImage; 14 | Button1: TButton; 15 | Button2: TButton; 16 | Button3: TButton; 17 | private 18 | { Private declarations } 19 | public 20 | { Public declarations } 21 | end; 22 | 23 | var 24 | Form1: TForm1; 25 | 26 | implementation 27 | 28 | {$R *.dfm} 29 | 30 | end. 31 | -------------------------------------------------------------------------------- /10.4-demos/HealthSystem/Per_Control_Styles_HealthSystem.dpr: -------------------------------------------------------------------------------- 1 | program Per_Control_Styles_HealthSystem; 2 | 3 | uses 4 | Vcl.Forms, 5 | HealthSystem_Unit1 in 'HealthSystem_Unit1.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Flat UI Light'); 15 | Application.CreateForm(TForm1, Form1); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /10.4-demos/HealthSystem/Per_Control_Styles_HealthSystem.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/HealthSystem/Per_Control_Styles_HealthSystem.res -------------------------------------------------------------------------------- /10.4-demos/ImageIndex_ImageName_Demo/ImageIndex_ImageName.dpr: -------------------------------------------------------------------------------- 1 | program ImageIndex_ImageName; 2 | 3 | uses 4 | Vcl.Forms, 5 | ImageIndex_ImageName_MainUnit in 'ImageIndex_ImageName_MainUnit.pas' {ImageIndex_ImageName_MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TImageIndex_ImageName_MainForm, ImageIndex_ImageName_MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/ImageIndex_ImageName_Demo/ImageIndex_ImageName.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ImageIndex_ImageName_Demo/ImageIndex_ImageName.res -------------------------------------------------------------------------------- /10.4-demos/ImageIndex_ImageName_Demo/ImageIndex_ImageName_MainUnit.pas: -------------------------------------------------------------------------------- 1 | unit ImageIndex_ImageName_MainUnit; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.ToolWin, 8 | System.ImageList, Vcl.ImgList, Vcl.VirtualImageList, Vcl.BaseImageCollection, 9 | Vcl.ImageCollection, Vcl.StdCtrls, Vcl.Buttons, Vcl.ExtCtrls, Vcl.WinXCtrls; 10 | 11 | type 12 | TImageIndex_ImageName_MainForm = class(TForm) 13 | Button1: TButton; 14 | ImageCollection1: TImageCollection; 15 | SmallVirtualImageList: TVirtualImageList; 16 | LargeVirtualImageList: TVirtualImageList; 17 | ToolBar1: TToolBar; 18 | ToolButton1: TToolButton; 19 | ToolButton2: TToolButton; 20 | ToolButton3: TToolButton; 21 | GroupBox1: TGroupBox; 22 | BitBtn1: TBitBtn; 23 | Button2: TButton; 24 | SpeedButton1: TSpeedButton; 25 | SpeedButton2: TSpeedButton; 26 | StatusBar1: TStatusBar; 27 | ListView1: TListView; 28 | SearchBox1: TSearchBox; 29 | Panel1: TPanel; 30 | ToolButton4: TToolButton; 31 | ToolButton5: TToolButton; 32 | ToolButton6: TToolButton; 33 | ToolButton7: TToolButton; 34 | ToolButton8: TToolButton; 35 | ToolButton9: TToolButton; 36 | ToolButton10: TToolButton; 37 | ToolButton11: TToolButton; 38 | ToolButton12: TToolButton; 39 | ToolButton13: TToolButton; 40 | ToolButton14: TToolButton; 41 | ToolButton15: TToolButton; 42 | ToolButton16: TToolButton; 43 | Label1: TLabel; 44 | ImageIndex_ImageName_MainForm: TLabel; 45 | procedure FormCreate(Sender: TObject); 46 | procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 47 | NewDPI: Integer); 48 | procedure SearchBox1Change(Sender: TObject); 49 | procedure BitBtn1DragOver(Sender, Source: TObject; X, Y: Integer; 50 | State: TDragState; var Accept: Boolean); 51 | procedure BitBtn1DragDrop(Sender, Source: TObject; X, Y: Integer); 52 | procedure SpeedButton2Click(Sender: TObject); 53 | procedure SearchBox1Exit(Sender: TObject); 54 | private 55 | procedure UpdateCaption; 56 | { Private declarations } 57 | public 58 | { Public declarations } 59 | end; 60 | 61 | var 62 | ImageIndex_ImageName_MainForm: TImageIndex_ImageName_MainForm; 63 | 64 | implementation 65 | 66 | {$R *.dfm} 67 | 68 | procedure TImageIndex_ImageName_MainForm.BitBtn1DragDrop(Sender, 69 | Source: TObject; X, Y: Integer); 70 | begin 71 | if Source = ListView1 then 72 | begin 73 | if Sender is TCustomButton then 74 | (Sender as TCustomButton).ImageName := ListView1.Selected.Caption 75 | else if sender is TToolButton then 76 | (sender as TToolButton).ImageName := ListView1.Selected.Caption 77 | end; 78 | end; 79 | 80 | procedure TImageIndex_ImageName_MainForm.BitBtn1DragOver(Sender, 81 | Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); 82 | begin 83 | Accept := Source = ListView1; 84 | end; 85 | 86 | procedure TImageIndex_ImageName_MainForm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 87 | NewDPI: Integer); 88 | begin 89 | UpdateCaption; 90 | end; 91 | 92 | procedure TImageIndex_ImageName_MainForm.UpdateCaption; 93 | begin 94 | Self.Caption := 'ImageIndex + ImageName property - Demo - DPI: ' + IntToStr(Round(Self.ScaleFactor * 100)) + '%'; 95 | end; 96 | 97 | procedure TImageIndex_ImageName_MainForm.FormCreate(Sender: TObject); 98 | begin 99 | UpdateCaption; 100 | for var i := 0 to LargeVirtualImageList.Count - 1 do 101 | begin 102 | var itm := ListView1.Items.Add; 103 | itm.Caption := LargeVirtualImageList.Images[i].Name; 104 | itm.ImageIndex := i; 105 | end; 106 | end; 107 | 108 | procedure TImageIndex_ImageName_MainForm.SearchBox1Change(Sender: TObject); 109 | begin 110 | for var i := 0 to ListView1.Items.count-1 do 111 | begin 112 | if ListView1.Items[i].Caption.Contains(SearchBox1.Text) then 113 | begin 114 | ListView1.ItemIndex := i; 115 | ListView1.Items[i].MakeVisible(False); 116 | break; 117 | end; 118 | end; 119 | end; 120 | 121 | procedure TImageIndex_ImageName_MainForm.SearchBox1Exit(Sender: TObject); 122 | begin 123 | SearchBox1.Clear; 124 | end; 125 | 126 | procedure TImageIndex_ImageName_MainForm.SpeedButton2Click(Sender: TObject); 127 | var 128 | ImageName: String; 129 | begin 130 | ListView1.ItemIndex := -1; 131 | 132 | if Sender is TCustomButton then 133 | ImageName := (Sender as TCustomButton).ImageName 134 | else if sender is TToolButton then 135 | ImageName := (Sender as TToolButton).ImageName 136 | else if sender is TCustomSpeedButton then 137 | ImageName := (Sender as TSpeedButton).ImageName 138 | else raise Exception.Create('Unsupport button type: ' + Sender.ClassName); 139 | 140 | 141 | ListView1.ItemIndex := LargeVirtualImageList.GetIndexByName(ImageName); 142 | ListView1.Selected.MakeVisible(False); 143 | end; 144 | 145 | end. 146 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingCheckBoxes.dpr: -------------------------------------------------------------------------------- 1 | program LiveBindingCheckBoxes; 2 | 3 | uses 4 | Vcl.Forms, 5 | LiveBindingsCheckBoxMain in 'LiveBindingsCheckBoxMain.pas' {Form1}, 6 | LiveBindingsCheckBoxFrame in 'LiveBindingsCheckBoxFrame.pas' {Frame2: TFrame}, 7 | LiveBindingsDataModule in 'LiveBindingsDataModule.pas' {DataModule3: TDataModule}, 8 | Vcl.Themes, 9 | Vcl.Styles; 10 | 11 | {$R *.res} 12 | 13 | begin 14 | Application.Initialize; 15 | Application.MainFormOnTaskbar := True; 16 | TStyleManager.TrySetStyle('Windows10 Blue'); 17 | Application.CreateForm(TForm1, Form1); 18 | Application.CreateForm(TDataModule3, DataModule3); 19 | Application.Run; 20 | end. 21 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingCheckBoxes.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/LiveBindings/LiveBindingCheckBoxes.res -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsCheckBoxFrame.dfm: -------------------------------------------------------------------------------- 1 | object Frame2: TFrame2 2 | Left = 0 3 | Top = 0 4 | Width = 227 5 | Height = 360 6 | DoubleBuffered = True 7 | ParentDoubleBuffered = False 8 | TabOrder = 0 9 | object CheckBox1: TCheckBox 10 | Left = 40 11 | Top = 32 12 | Width = 97 13 | Height = 17 14 | Caption = 'CheckBox1' 15 | TabOrder = 0 16 | end 17 | object CheckBox2: TCheckBox 18 | Left = 40 19 | Top = 62 20 | Width = 97 21 | Height = 17 22 | Caption = 'CheckBox2' 23 | TabOrder = 1 24 | end 25 | object CheckBox3: TCheckBox 26 | Left = 40 27 | Top = 92 28 | Width = 97 29 | Height = 17 30 | Caption = 'CheckBox3' 31 | TabOrder = 2 32 | end 33 | object CheckBox4: TCheckBox 34 | Left = 40 35 | Top = 122 36 | Width = 97 37 | Height = 17 38 | Caption = 'CheckBox4' 39 | TabOrder = 3 40 | end 41 | object CheckBox5: TCheckBox 42 | Left = 40 43 | Top = 152 44 | Width = 97 45 | Height = 17 46 | Caption = 'CheckBox5' 47 | TabOrder = 4 48 | end 49 | object CheckBox6: TCheckBox 50 | Left = 40 51 | Top = 182 52 | Width = 97 53 | Height = 17 54 | Caption = 'CheckBox6' 55 | TabOrder = 5 56 | end 57 | object CheckBox7: TCheckBox 58 | Left = 40 59 | Top = 212 60 | Width = 97 61 | Height = 17 62 | Caption = 'CheckBox7' 63 | TabOrder = 6 64 | end 65 | object CheckBox8: TCheckBox 66 | Left = 40 67 | Top = 240 68 | Width = 97 69 | Height = 17 70 | Caption = 'CheckBox8' 71 | TabOrder = 7 72 | end 73 | object CheckBox9: TCheckBox 74 | Left = 40 75 | Top = 272 76 | Width = 97 77 | Height = 17 78 | Caption = 'CheckBox9' 79 | TabOrder = 8 80 | end 81 | object CheckBox10: TCheckBox 82 | Left = 40 83 | Top = 302 84 | Width = 97 85 | Height = 17 86 | Caption = 'CheckBox10' 87 | TabOrder = 9 88 | end 89 | object BindSourceDB1: TBindSourceDB 90 | DataSet = DataModule3.FDMemTable1 91 | ScopeMappings = <> 92 | Left = 168 93 | Top = 24 94 | end 95 | object BindingsList1: TBindingsList 96 | Methods = <> 97 | OutputConverters = <> 98 | Left = 180 99 | Top = 85 100 | object LinkControlToField1: TLinkControlToField 101 | Category = 'Quick Bindings' 102 | DataSource = BindSourceDB1 103 | FieldName = 'Option' 104 | Control = CheckBox1 105 | Track = True 106 | end 107 | object LinkControlToField2: TLinkControlToField 108 | Category = 'Quick Bindings' 109 | DataSource = BindSourceDB1 110 | FieldName = 'Option' 111 | Control = CheckBox10 112 | Track = True 113 | end 114 | object LinkControlToField3: TLinkControlToField 115 | Category = 'Quick Bindings' 116 | DataSource = BindSourceDB1 117 | FieldName = 'Option' 118 | Control = CheckBox4 119 | Track = True 120 | end 121 | object LinkControlToField4: TLinkControlToField 122 | Category = 'Quick Bindings' 123 | DataSource = BindSourceDB1 124 | FieldName = 'Option' 125 | Control = CheckBox7 126 | Track = True 127 | end 128 | object LinkControlToField5: TLinkControlToField 129 | Category = 'Quick Bindings' 130 | DataSource = BindSourceDB1 131 | FieldName = 'Option' 132 | Control = CheckBox5 133 | Track = True 134 | end 135 | object LinkControlToField6: TLinkControlToField 136 | Category = 'Quick Bindings' 137 | DataSource = BindSourceDB1 138 | FieldName = 'Option' 139 | Control = CheckBox6 140 | Track = True 141 | end 142 | object LinkControlToField7: TLinkControlToField 143 | Category = 'Quick Bindings' 144 | DataSource = BindSourceDB1 145 | FieldName = 'Option' 146 | Control = CheckBox9 147 | Track = True 148 | end 149 | object LinkControlToField8: TLinkControlToField 150 | Category = 'Quick Bindings' 151 | DataSource = BindSourceDB1 152 | FieldName = 'Option' 153 | Control = CheckBox2 154 | Track = True 155 | end 156 | object LinkControlToField9: TLinkControlToField 157 | Category = 'Quick Bindings' 158 | DataSource = BindSourceDB1 159 | FieldName = 'Option' 160 | Control = CheckBox3 161 | Track = True 162 | end 163 | object LinkControlToField10: TLinkControlToField 164 | Category = 'Quick Bindings' 165 | DataSource = BindSourceDB1 166 | FieldName = 'Option' 167 | Control = CheckBox8 168 | Track = True 169 | end 170 | end 171 | end 172 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsCheckBoxFrame.pas: -------------------------------------------------------------------------------- 1 | unit LiveBindingsCheckBoxFrame; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, 7 | Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, System.Rtti, 8 | System.Bindings.Outputs, Vcl.Bind.Editors, Data.Bind.EngExt, 9 | Vcl.Bind.DBEngExt, Data.Bind.Components, Data.Bind.DBScope, Vcl.StdCtrls; 10 | 11 | type 12 | TFrame2 = class(TFrame) 13 | CheckBox1: TCheckBox; 14 | CheckBox2: TCheckBox; 15 | CheckBox3: TCheckBox; 16 | CheckBox4: TCheckBox; 17 | CheckBox5: TCheckBox; 18 | CheckBox6: TCheckBox; 19 | CheckBox7: TCheckBox; 20 | CheckBox8: TCheckBox; 21 | CheckBox9: TCheckBox; 22 | CheckBox10: TCheckBox; 23 | BindSourceDB1: TBindSourceDB; 24 | BindingsList1: TBindingsList; 25 | LinkControlToField1: TLinkControlToField; 26 | LinkControlToField2: TLinkControlToField; 27 | LinkControlToField3: TLinkControlToField; 28 | LinkControlToField4: TLinkControlToField; 29 | LinkControlToField5: TLinkControlToField; 30 | LinkControlToField6: TLinkControlToField; 31 | LinkControlToField7: TLinkControlToField; 32 | LinkControlToField8: TLinkControlToField; 33 | LinkControlToField9: TLinkControlToField; 34 | LinkControlToField10: TLinkControlToField; 35 | private 36 | { Private declarations } 37 | public 38 | { Public declarations } 39 | end; 40 | 41 | implementation 42 | 43 | {$R *.dfm} 44 | 45 | uses LiveBindingsDataModule; 46 | 47 | end. 48 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsCheckBoxMain.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'LiveBindings CheckBox Performance' 5 | ClientHeight = 757 6 | ClientWidth = 1113 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object Label1: TLabel 17 | Left = 0 18 | Top = 0 19 | Width = 1113 20 | Height = 23 21 | Align = alTop 22 | Alignment = taCenter 23 | AutoSize = False 24 | Caption = 25 | 'This form contains 8 frames, each with 10 check boxes, all bound' + 26 | ' together. ' 27 | Font.Charset = DEFAULT_CHARSET 28 | Font.Color = clWindowText 29 | Font.Height = -19 30 | Font.Name = 'Tahoma' 31 | Font.Style = [] 32 | ParentFont = False 33 | WordWrap = True 34 | ExplicitWidth = 639 35 | end 36 | object Label2: TLabel 37 | Left = 0 38 | Top = 23 39 | Width = 1113 40 | Height = 33 41 | Align = alTop 42 | Alignment = taCenter 43 | AutoSize = False 44 | Caption = 'Changing one immediately chages the other 79 immediately.' 45 | Font.Charset = DEFAULT_CHARSET 46 | Font.Color = clWindowText 47 | Font.Height = -19 48 | Font.Name = 'Tahoma' 49 | Font.Style = [] 50 | ParentFont = False 51 | WordWrap = True 52 | ExplicitTop = 8 53 | end 54 | inline Frame22: TFrame2 55 | Left = 312 56 | Top = 28 57 | Width = 227 58 | Height = 360 59 | DoubleBuffered = True 60 | ParentDoubleBuffered = False 61 | TabOrder = 0 62 | ExplicitLeft = 312 63 | ExplicitTop = 28 64 | end 65 | inline Frame23: TFrame2 66 | Left = 600 67 | Top = 28 68 | Width = 227 69 | Height = 360 70 | DoubleBuffered = True 71 | ParentDoubleBuffered = False 72 | TabOrder = 1 73 | ExplicitLeft = 600 74 | ExplicitTop = 28 75 | end 76 | inline Frame24: TFrame2 77 | Left = 24 78 | Top = 394 79 | Width = 227 80 | Height = 360 81 | DoubleBuffered = True 82 | ParentDoubleBuffered = False 83 | TabOrder = 2 84 | ExplicitLeft = 24 85 | ExplicitTop = 394 86 | end 87 | inline Frame25: TFrame2 88 | Left = 312 89 | Top = 394 90 | Width = 227 91 | Height = 360 92 | DoubleBuffered = True 93 | ParentDoubleBuffered = False 94 | TabOrder = 3 95 | ExplicitLeft = 312 96 | ExplicitTop = 394 97 | end 98 | inline Frame26: TFrame2 99 | Left = 592 100 | Top = 394 101 | Width = 227 102 | Height = 360 103 | DoubleBuffered = True 104 | ParentDoubleBuffered = False 105 | TabOrder = 4 106 | ExplicitLeft = 592 107 | ExplicitTop = 394 108 | end 109 | inline Frame27: TFrame2 110 | Left = 856 111 | Top = 28 112 | Width = 227 113 | Height = 360 114 | DoubleBuffered = True 115 | ParentDoubleBuffered = False 116 | TabOrder = 5 117 | ExplicitLeft = 856 118 | ExplicitTop = 28 119 | end 120 | inline Frame28: TFrame2 121 | Left = 856 122 | Top = 394 123 | Width = 227 124 | Height = 360 125 | DoubleBuffered = True 126 | ParentDoubleBuffered = False 127 | TabOrder = 6 128 | ExplicitLeft = 856 129 | ExplicitTop = 394 130 | end 131 | object RelativePanel1: TRelativePanel 132 | Left = 0 133 | Top = 56 134 | Width = 1113 135 | Height = 701 136 | ControlCollection = <> 137 | Align = alClient 138 | BevelOuter = bvNone 139 | TabOrder = 7 140 | ExplicitTop = 8 141 | ExplicitHeight = 744 142 | end 143 | inline Frame21: TFrame2 144 | Left = 24 145 | Top = 28 146 | Width = 227 147 | Height = 360 148 | DoubleBuffered = True 149 | ParentDoubleBuffered = False 150 | TabOrder = 8 151 | ExplicitLeft = 24 152 | ExplicitTop = 28 153 | end 154 | object Timer1: TTimer 155 | Interval = 500 156 | OnTimer = Timer1Timer 157 | Left = 552 158 | Top = 192 159 | end 160 | end 161 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsCheckBoxMain.pas: -------------------------------------------------------------------------------- 1 | unit LiveBindingsCheckBoxMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, LiveBindingsCheckBoxFrame, 8 | Vcl.WinXCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | Frame22: TFrame2; 13 | Frame23: TFrame2; 14 | Frame24: TFrame2; 15 | Frame25: TFrame2; 16 | Frame26: TFrame2; 17 | Frame27: TFrame2; 18 | Frame28: TFrame2; 19 | Timer1: TTimer; 20 | RelativePanel1: TRelativePanel; 21 | Label1: TLabel; 22 | Frame21: TFrame2; 23 | Label2: TLabel; 24 | procedure Timer1Timer(Sender: TObject); 25 | private 26 | { Private declarations } 27 | public 28 | { Public declarations } 29 | end; 30 | 31 | var 32 | Form1: TForm1; 33 | 34 | implementation 35 | 36 | {$R *.dfm} 37 | 38 | procedure TForm1.Timer1Timer(Sender: TObject); 39 | begin 40 | Timer1.Enabled := False; 41 | 42 | {Frame21.Visible := True; 43 | Frame22.Visible := True; 44 | Frame23.Visible := True; 45 | Frame24.Visible := True; 46 | Frame25.Visible := True; 47 | Frame26.Visible := True; 48 | Frame27.Visible := True; 49 | Frame28.Visible := True; } 50 | 51 | //ActivityIndicator1.Animate := False; 52 | RelativePanel1.Visible := False; 53 | end; 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsDataModule.dfm: -------------------------------------------------------------------------------- 1 | object DataModule3: TDataModule3 2 | OldCreateOrder = False 3 | Height = 458 4 | Width = 655 5 | object FDMemTable1: TFDMemTable 6 | Active = True 7 | FieldDefs = < 8 | item 9 | Name = 'Option' 10 | DataType = ftBoolean 11 | end> 12 | IndexDefs = <> 13 | FetchOptions.AssignedValues = [evMode] 14 | FetchOptions.Mode = fmAll 15 | ResourceOptions.AssignedValues = [rvPersistent, rvSilentMode] 16 | ResourceOptions.Persistent = True 17 | ResourceOptions.SilentMode = True 18 | UpdateOptions.AssignedValues = [uvCheckRequired, uvAutoCommitUpdates] 19 | UpdateOptions.CheckRequired = False 20 | UpdateOptions.AutoCommitUpdates = True 21 | StoreDefs = True 22 | Left = 224 23 | Top = 168 24 | Content = { 25 | 414442530F000000D6000000FF00010001FF02FF03040016000000460044004D 26 | 0065006D005400610062006C006500310005000A0000005400610062006C0065 27 | 00060000000000070000080032000000090000FF0AFF0B04000C0000004F0070 28 | 00740069006F006E0005000C0000004F007000740069006F006E000C00010000 29 | 000E000D000F000110000111000112000113000114000115000C0000004F0070 30 | 00740069006F006E00FEFEFF16FEFF17FEFF18FF191A0000000000FF1B000000 31 | 00FEFEFEFEFEFF1CFEFF1D1E0001000000FF1FFEFEFE0E004D0061006E006100 32 | 6700650072001E00550070006400610074006500730052006500670069007300 33 | 74007200790012005400610062006C0065004C006900730074000A0054006100 34 | 62006C00650008004E0061006D006500140053006F0075007200630065004E00 35 | 61006D0065000A0054006100620049004400240045006E0066006F0072006300 36 | 650043006F006E00730074007200610069006E00740073001E004D0069006E00 37 | 69006D0075006D00430061007000610063006900740079001800430068006500 38 | 63006B004E006F0074004E0075006C006C00140043006F006C0075006D006E00 39 | 4C006900730074000C0043006F006C0075006D006E00100053006F0075007200 40 | 630065004900440012006400740042006F006F006C00650061006E0010004400 41 | 6100740061005400790070006500140053006500610072006300680061006200 42 | 6C006500120041006C006C006F0077004E0075006C006C000800420061007300 43 | 650014004F0041006C006C006F0077004E0075006C006C0012004F0049006E00 44 | 55007000640061007400650010004F0049006E00570068006500720065001A00 45 | 4F0072006900670069006E0043006F006C004E0061006D0065001C0043006F00 46 | 6E00730074007200610069006E0074004C006900730074001000560069006500 47 | 77004C006900730074000E0052006F0077004C00690073007400060052006F00 48 | 77000A0052006F0077004900440010004F0072006900670069006E0061006C00 49 | 1800520065006C006100740069006F006E004C006900730074001C0055007000 50 | 640061007400650073004A006F00750072006E0061006C001200530061007600 51 | 650050006F0069006E0074000E004300680061006E00670065007300} 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /10.4-demos/LiveBindings/LiveBindingsDataModule.pas: -------------------------------------------------------------------------------- 1 | unit LiveBindingsDataModule; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option, 7 | FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, 8 | FireDAC.DApt.Intf, FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, 9 | FireDAC.Comp.Client; 10 | 11 | type 12 | TDataModule3 = class(TDataModule) 13 | FDMemTable1: TFDMemTable; 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | end; 19 | 20 | var 21 | DataModule3: TDataModule3; 22 | 23 | implementation 24 | 25 | {%CLASSGROUP 'Vcl.Controls.TControl'} 26 | 27 | {$R *.dfm} 28 | 29 | end. 30 | -------------------------------------------------------------------------------- /10.4-demos/ManagedRecords/ManagedRecords.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ManagedRecords/ManagedRecords.res -------------------------------------------------------------------------------- /10.4-demos/ManagedRecords/ManagedRecordsGUI.dpr: -------------------------------------------------------------------------------- 1 | program ManagedRecordsGUI; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | ManagedRecordsUnit1 in 'ManagedRecordsUnit1.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/ManagedRecords/ManagedRecordsGUI.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ManagedRecords/ManagedRecordsGUI.res -------------------------------------------------------------------------------- /10.4-demos/ManagedRecords/ManagedRecordsUnit1.pas: -------------------------------------------------------------------------------- 1 | unit ManagedRecordsUnit1; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ScrollBox, 8 | FMX.Memo, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Memo.Types; 9 | 10 | type 11 | // This is a custom managed record 12 | // The Initialize and Finalize are both called automatically 13 | TMyRecord = record 14 | Value: Integer; 15 | class operator Initialize(out Dest: TMyRecord); 16 | class operator Finalize(var Dest: TMyRecord); 17 | end; 18 | 19 | TForm1 = class(TForm) 20 | GoButton: TButton; 21 | Memo1: TMemo; 22 | MaterialOxfordBlueSB: TStyleBook; 23 | procedure GoButtonClick(Sender: TObject); 24 | private 25 | { Private declarations } 26 | public 27 | { Public declarations } 28 | end; 29 | 30 | var 31 | Form1: TForm1; 32 | 33 | implementation 34 | 35 | {$R *.fmx} 36 | 37 | // The Initialize is called when the record declaration is in scope 38 | class operator TMyRecord.Initialize(out Dest: TMyRecord); 39 | begin 40 | Dest.Value := 10; 41 | Form1.Memo1.Lines.Append('Record created @' + IntToHex(Integer(Pointer(@Dest)))); 42 | end; 43 | 44 | // The Finalize is called when the record goes out of scope 45 | class operator TMyRecord.Finalize(var Dest: TMyRecord); 46 | begin 47 | Form1.Memo1.Lines.Append('Record destroyed @' + IntToHex(Integer(Pointer(@Dest)))); 48 | end; 49 | 50 | procedure TForm1.GoButtonClick(Sender: TObject); 51 | begin 52 | Memo1.Lines.Append('Before scope'); 53 | begin 54 | var LMyRecord: TMyRecord; 55 | Memo1.Lines.Append('After declare'); 56 | // Since it is a record there is no need to call create! 57 | Memo1.Lines.Append('Initial value: ' + LMyRecord.Value.ToString); 58 | LMyRecord.Value := 20; 59 | Memo1.Lines.Append('Changed value: ' + LMyRecord.Value.ToString); 60 | Memo1.Lines.Append('After use'); 61 | end; 62 | // It was automatically Finalized when it went out of scope! 63 | Memo1.Lines.Append('After scope'); 64 | end; 65 | 66 | end. 67 | -------------------------------------------------------------------------------- /10.4-demos/ManagedRecordsConsole/ManagedRecords.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ManagedRecordsConsole/ManagedRecords.res -------------------------------------------------------------------------------- /10.4-demos/ManagedRecordsConsole/ManagedRecordsConsole.dpr: -------------------------------------------------------------------------------- 1 | program ManagedRecordsConsole; 2 | 3 | {$APPTYPE CONSOLE} 4 | {$R *.res} 5 | 6 | uses 7 | System.SysUtils; 8 | 9 | type 10 | // This is a custom managed record 11 | // The Initialize and Finalize are both called automatically 12 | TMyRecord = record 13 | Value: Integer; 14 | class operator Initialize(out Dest: TMyRecord); 15 | class operator Finalize(var Dest: TMyRecord); 16 | end; 17 | 18 | // The Initialize is called when the record declaration is in scope 19 | class operator TMyRecord.Initialize(out Dest: TMyRecord); 20 | begin 21 | Dest.Value := 10; 22 | WriteLn('Initialize called'); 23 | end; 24 | 25 | // The Finalize is called when the record goes out of scope 26 | class operator TMyRecord.Finalize(var Dest: TMyRecord); 27 | begin 28 | WriteLn('Finalize called'); 29 | end; 30 | 31 | begin 32 | WriteLn('-Before declaration-'); 33 | try 34 | var LMyRecord: TMyRecord; // record Initialized. 35 | WriteLn('-Automatically Initialized-'); 36 | WriteLn('Value: ' + LMyRecord.Value.ToString); 37 | WriteLn('-After use, still in scope-'); 38 | except // record Finalized. 39 | on E: Exception do 40 | WriteLn(E.ClassName, ': ', E.Message); 41 | end; 42 | WriteLn('-Out of scope-'); 43 | Readln; 44 | end. 45 | -------------------------------------------------------------------------------- /10.4-demos/ManagedRecordsConsole/ManagedRecordsConsole.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ManagedRecordsConsole/ManagedRecordsConsole.res -------------------------------------------------------------------------------- /10.4-demos/Messages_Demo/Messages_Demo.dpr: -------------------------------------------------------------------------------- 1 | program Messages_Demo; 2 | 3 | uses 4 | Vcl.Forms, 5 | Messages_Demo_MainUnit in 'Messages_Demo_MainUnit.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Glow'); 15 | Application.CreateForm(TMessages_Demo_MainForm, Messages_Demo_MainForm); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /10.4-demos/Messages_Demo/Messages_Demo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/Messages_Demo/Messages_Demo.res -------------------------------------------------------------------------------- /10.4-demos/Messages_Demo/Messages_Demo_MainUnit.dfm: -------------------------------------------------------------------------------- 1 | object Messages_Demo_MainForm: TMessages_Demo_MainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Messages - Demo' 5 | ClientHeight = 299 6 | ClientWidth = 375 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged 16 | OnCreate = FormCreate 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object Label1: TLabel 20 | Left = 24 21 | Top = 24 22 | Width = 28 23 | Height = 13 24 | Caption = 'Style:' 25 | end 26 | object Button1: TButton 27 | Left = 24 28 | Top = 74 29 | Width = 305 30 | Height = 41 31 | Caption = 'Show message with custom caption for buttons' 32 | TabOrder = 0 33 | OnClick = Button1Click 34 | end 35 | object ComboBox1: TComboBox 36 | Left = 68 37 | Top = 21 38 | Width = 261 39 | Height = 21 40 | Style = csDropDownList 41 | TabOrder = 1 42 | OnChange = ComboBox1Change 43 | end 44 | object Button2: TButton 45 | Left = 192 46 | Top = 137 47 | Width = 137 48 | Height = 41 49 | Caption = 'Show Error Message' 50 | TabOrder = 2 51 | OnClick = Button2Click 52 | end 53 | object Button3: TButton 54 | Left = 24 55 | Top = 137 56 | Width = 146 57 | Height = 41 58 | Caption = 'Show Message' 59 | TabOrder = 3 60 | OnClick = Button3Click 61 | end 62 | object Button4: TButton 63 | Left = 24 64 | Top = 192 65 | Width = 146 66 | Height = 41 67 | Caption = 'Show Warning Message' 68 | TabOrder = 4 69 | OnClick = Button4Click 70 | end 71 | object Button5: TButton 72 | Left = 192 73 | Top = 192 74 | Width = 137 75 | Height = 41 76 | Caption = 'Show Info Message' 77 | TabOrder = 5 78 | OnClick = Button2Click 79 | end 80 | end 81 | -------------------------------------------------------------------------------- /10.4-demos/Messages_Demo/Messages_Demo_MainUnit.pas: -------------------------------------------------------------------------------- 1 | unit Messages_Demo_MainUnit; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, 7 | System.Classes, System.UITypes, 8 | Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Themes; 9 | 10 | type 11 | TMessages_Demo_MainForm = class(TForm) 12 | Button1: TButton; 13 | Label1: TLabel; 14 | ComboBox1: TComboBox; 15 | Button2: TButton; 16 | Button3: TButton; 17 | Button4: TButton; 18 | Button5: TButton; 19 | procedure Button1Click(Sender: TObject); 20 | procedure FormCreate(Sender: TObject); 21 | procedure ComboBox1Change(Sender: TObject); 22 | procedure Button3Click(Sender: TObject); 23 | procedure Button2Click(Sender: TObject); 24 | procedure Button4Click(Sender: TObject); 25 | procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 26 | NewDPI: Integer); 27 | private 28 | procedure UpdateCaption; 29 | { Private declarations } 30 | public 31 | { Public declarations } 32 | end; 33 | 34 | var 35 | Messages_Demo_MainForm: TMessages_Demo_MainForm; 36 | 37 | implementation 38 | 39 | {$R *.dfm} 40 | 41 | procedure TMessages_Demo_MainForm.Button1Click(Sender: TObject); 42 | begin 43 | MessageDlg('What do you think of the custom buttom captions?', 44 | mtConfirmation, [mbYes, mbNo], -1, mbYes, 45 | ['Wow! Amazing', 'I can''t wait to use 10.4 Sydney!']); 46 | end; 47 | 48 | procedure TMessages_Demo_MainForm.Button2Click(Sender: TObject); 49 | begin 50 | MessageDlg('The 12 buttons are in this order: '+sLineBreak+ 51 | 'mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose', mtInformation, 52 | [mbYes,mbNo,mbOK,mbCancel,mbAbort,mbRetry,mbIgnore,mbAll,mbNoToAll,mbYesToAll,mbHelp,mbClose], -1, mbClose, 53 | ['Yes,','you','can','use','and','change','the','captions','of','all','twelve','buttons!']); 54 | end; 55 | 56 | procedure TMessages_Demo_MainForm.Button3Click(Sender: TObject); 57 | begin 58 | MessageDlg('Do you want to say "good-bye"?', mtConfirmation, 59 | [mbYes, mbNo], -1, mbYes, 60 | ['Parting is such sweet sorrow!', 'Until we meet again!', 'Extra captions are ignored!']); 61 | end; 62 | 63 | procedure TMessages_Demo_MainForm.Button4Click(Sender: TObject); 64 | begin 65 | MessageDlg('Warning message test?', mtWarning, [mbYes, mbOK], -1, mbOK, 66 | ['Only this first button is changed!']); 67 | end; 68 | 69 | procedure TMessages_Demo_MainForm.ComboBox1Change(Sender: TObject); 70 | begin 71 | TStyleManager.SetStyle(ComboBox1.Items[ComboBox1.ItemIndex]); 72 | end; 73 | 74 | procedure TMessages_Demo_MainForm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 75 | NewDPI: Integer); 76 | begin 77 | UpdateCaption; 78 | end; 79 | 80 | procedure TMessages_Demo_MainForm.UpdateCaption; 81 | begin 82 | Self.Caption := 'Messages - Demo - DPI: ' + IntToStr(Round(Self.ScaleFactor * 100)) + '%'; 83 | end; 84 | 85 | procedure TMessages_Demo_MainForm.FormCreate(Sender: TObject); 86 | begin 87 | UpdateCaption; 88 | for var I := Low(TStyleManager.StyleNames) to High(TStyleManager.StyleNames) do 89 | ComboBox1.Items.Add(TStyleManager.StyleNames[I]); 90 | ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(TStyleManager.ActiveStyle.Name); 91 | end; 92 | 93 | end. 94 | -------------------------------------------------------------------------------- /10.4-demos/MetalDemo/MetalDemo.dpr: -------------------------------------------------------------------------------- 1 | program MetalDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | MetalDemoUnit1 in 'MetalDemoUnit1.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/MetalDemo/MetalDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/MetalDemo/MetalDemo.res -------------------------------------------------------------------------------- /10.4-demos/MetalDemo/MetalDemoUnit1.pas: -------------------------------------------------------------------------------- 1 | unit MetalDemoUnit1; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Ani, 8 | FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | Image1: TImage; 13 | FloatAnimation1: TFloatAnimation; 14 | Button1: TButton; 15 | Label1: TLabel; 16 | Label2: TLabel; 17 | Label3: TLabel; 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | Form1: TForm1; 26 | 27 | implementation 28 | 29 | {$R *.fmx} 30 | 31 | initialization 32 | FMX.Types.GlobalUseMetal := True; 33 | 34 | end. 35 | -------------------------------------------------------------------------------- /10.4-demos/Per_Control_Styles/Colorful_Main1.pas: -------------------------------------------------------------------------------- 1 | unit Colorful_Main1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, 8 | Vcl.WinXCalendars, Vcl.WinXPickers, Vcl.WinXCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | Button1: TButton; 13 | Button2: TButton; 14 | Button3: TButton; 15 | Button4: TButton; 16 | Button5: TButton; 17 | Panel1: TPanel; 18 | Panel2: TPanel; 19 | Panel3: TPanel; 20 | Panel4: TPanel; 21 | Panel5: TPanel; 22 | CalendarPicker1: TCalendarPicker; 23 | CalendarView1: TCalendarView; 24 | CalendarPicker2: TCalendarPicker; 25 | CalendarView2: TCalendarView; 26 | CalendarPicker3: TCalendarPicker; 27 | CalendarView3: TCalendarView; 28 | CalendarPicker4: TCalendarPicker; 29 | CalendarView4: TCalendarView; 30 | CalendarPicker5: TCalendarPicker; 31 | CalendarView5: TCalendarView; 32 | SearchBox1: TSearchBox; 33 | DatePicker1: TDatePicker; 34 | TimePicker1: TTimePicker; 35 | SearchBox2: TSearchBox; 36 | DatePicker2: TDatePicker; 37 | TimePicker2: TTimePicker; 38 | SearchBox3: TSearchBox; 39 | DatePicker3: TDatePicker; 40 | TimePicker3: TTimePicker; 41 | SearchBox4: TSearchBox; 42 | DatePicker4: TDatePicker; 43 | TimePicker4: TTimePicker; 44 | SearchBox5: TSearchBox; 45 | DatePicker5: TDatePicker; 46 | TimePicker5: TTimePicker; 47 | private 48 | { Private declarations } 49 | public 50 | { Public declarations } 51 | end; 52 | 53 | var 54 | Form1: TForm1; 55 | 56 | implementation 57 | 58 | {$R *.dfm} 59 | 60 | end. 61 | -------------------------------------------------------------------------------- /10.4-demos/Per_Control_Styles/Colors.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/Per_Control_Styles/Colors.res -------------------------------------------------------------------------------- /10.4-demos/Per_Control_Styles/Per_Control_Styles_Colorful.dpr: -------------------------------------------------------------------------------- 1 | program Per_Control_Styles_Colorful; 2 | 3 | uses 4 | Vcl.Forms, 5 | Colorful_Main1 in 'Colorful_Main1.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Aqua Light Slate'); 15 | Application.CreateForm(TForm1, Form1); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /10.4-demos/Per_Control_Styles/Per_Control_Styles_Colorful.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/Per_Control_Styles/Per_Control_Styles_Colorful.res -------------------------------------------------------------------------------- /10.4-demos/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/README.md -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/DeSerTest_Rio.dpr: -------------------------------------------------------------------------------- 1 | program DeSerTest_Rio; 2 | 3 | uses 4 | Vcl.Forms, 5 | MainFormU in 'MainFormU.pas' {Form6}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm6, Form6); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/DeSerTest_Rio.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/RTTISpeed/DeSerTest_Rio.res -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/DeSerTest_Sydney.dpr: -------------------------------------------------------------------------------- 1 | program DeSerTest_Sydney; 2 | 3 | uses 4 | Vcl.Forms, 5 | MainFormU in 'MainFormU.pas' {Form6}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm6, Form6); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/DeSerTest_Sydney.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/RTTISpeed/DeSerTest_Sydney.res -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/MainFormU.dfm: -------------------------------------------------------------------------------- 1 | object Form6: TForm6 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form6' 5 | ClientHeight = 330 6 | ClientWidth = 488 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnSpeedTest: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 169 20 | Height = 49 21 | Caption = 'Serialize 1 million of object to a JSON Array of JSON Object' 22 | TabOrder = 0 23 | WordWrap = True 24 | OnClick = btnSpeedTestClick 25 | end 26 | object Memo1: TMemo 27 | Left = 8 28 | Top = 63 29 | Width = 472 30 | Height = 250 31 | Font.Charset = ANSI_CHARSET 32 | Font.Color = clWindowText 33 | Font.Height = -24 34 | Font.Name = 'Consolas' 35 | Font.Style = [] 36 | ParentFont = False 37 | TabOrder = 1 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/MainFormU.pas: -------------------------------------------------------------------------------- 1 | unit MainFormU; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Generics.Collections; 8 | 9 | type 10 | TForm6 = class(TForm) 11 | btnSpeedTest: TButton; 12 | Memo1: TMemo; 13 | procedure Button1Click(Sender: TObject); 14 | procedure btnSpeedTestClick(Sender: TObject); 15 | private 16 | { Private declarations } 17 | public 18 | { Public declarations } 19 | end; 20 | TMyItem = class 21 | private 22 | FPropItem1: String; 23 | FPropItem2: String; 24 | procedure SetPropItem1(const Value: String); 25 | procedure SetPropItem2(const Value: String); 26 | public 27 | constructor Create(const Value1, Value2: String); 28 | property PropItem1: String read FPropItem1 write SetPropItem1; 29 | property PropItem2: String read FPropItem2 write SetPropItem2; 30 | end; 31 | 32 | TMyContainer = class 33 | private 34 | FProp1: String; 35 | FPropList1: TObjectList; 36 | FArrayOfString: TArray; 37 | procedure SetProp1(const Value: String); 38 | procedure SetPropList1(const Value: TObjectList); 39 | procedure SetArrayOfString(const Value: TArray); 40 | public 41 | constructor Create; 42 | destructor Destroy; override; 43 | property Prop1: String read FProp1 write SetProp1; 44 | property PropList1: TObjectList read FPropList1 write SetPropList1; 45 | property ArrayOfString: TArray read FArrayOfString write SetArrayOfString; 46 | end; 47 | 48 | 49 | var 50 | Form6: TForm6; 51 | 52 | implementation 53 | 54 | uses 55 | MVCFramework.Serializer.JsonDataObjects, System.Diagnostics; 56 | 57 | {$R *.dfm} 58 | 59 | procedure Load(const Data: TObjectList); 60 | begin 61 | for var I := 1 to 1000000 do 62 | begin 63 | Data.Add(TMyItem.Create(I.ToString, I.ToString)); 64 | end; 65 | end; 66 | 67 | procedure TForm6.btnSpeedTestClick(Sender: TObject); 68 | begin 69 | var lSer := TMVCJsonDataObjectsSerializer.Create; 70 | try 71 | var lObj := TObjectList.Create; 72 | try 73 | Load(lObj); 74 | var SW: TStopWatch := tstopwatch.startnew; 75 | var lJString := lSer.SerializeCollection(lObj); 76 | Memo1.Lines.Add('Serialize: ' + SW.ElapsedMilliseconds.ToString + 'ms'); 77 | // SW:= tstopwatch.startnew; 78 | // lSer.DeserializeCollection(lJString, lObj, TMyItem); 79 | // Memo1.Lines.Add('DeSerialize: ' + SW.ElapsedMilliseconds.ToString); 80 | finally 81 | lObj.Free; 82 | end; 83 | finally 84 | lSer.Free; 85 | end; 86 | end; 87 | 88 | procedure TForm6.Button1Click(Sender: TObject); 89 | begin 90 | var lSer := TMVCJsonDataObjectsSerializer.Create; 91 | try 92 | var lObj := TMyContainer.Create; 93 | try 94 | var lJString := '{"Prop1":"Hello World", "PropList1":[{"PropItem1":"Value1"},{"PropItem1":"Value2"}], "ArrayOfString": ["Item1","Item2"]}'; 95 | lSer.DeserializeObject(lJString, lObj); 96 | Assert( lObj.Prop1 = 'Hello World'); 97 | Assert( lObj.PropList1.Count = 2); 98 | Assert( lObj.PropList1[0].PropItem1 = 'Value1'); 99 | Assert( lObj.PropList1[1].PropItem1 = 'Value2'); 100 | finally 101 | lObj.Free; 102 | end; 103 | finally 104 | lSer.Free; 105 | end; 106 | end; 107 | 108 | { TMyContainer } 109 | 110 | constructor TMyContainer.Create; 111 | begin 112 | inherited; 113 | FPropList1 := TObjectList.Create; 114 | end; 115 | 116 | destructor TMyContainer.Destroy; 117 | begin 118 | FPropList1.Free; 119 | inherited; 120 | end; 121 | 122 | procedure TMyContainer.SetArrayOfString(const Value: TArray); 123 | begin 124 | FArrayOfString := Value; 125 | end; 126 | 127 | procedure TMyContainer.SetProp1(const Value: String); 128 | begin 129 | FProp1 := Value; 130 | end; 131 | 132 | procedure TMyContainer.SetPropList1(const Value: TObjectList); 133 | begin 134 | FPropList1 := Value; 135 | end; 136 | 137 | { TMyItem } 138 | 139 | constructor TMyItem.Create(const Value1, Value2: String); 140 | begin 141 | inherited Create; 142 | self.FPropItem1 := Value1; 143 | self.FPropItem2 := Value2; 144 | end; 145 | 146 | procedure TMyItem.SetPropItem1(const Value: String); 147 | begin 148 | FPropItem1 := Value; 149 | end; 150 | 151 | procedure TMyItem.SetPropItem2(const Value: String); 152 | begin 153 | FPropItem2 := Value; 154 | end; 155 | 156 | end. 157 | -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/Rio_Sydney_Comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/RTTISpeed/Rio_Sydney_Comparison.png -------------------------------------------------------------------------------- /10.4-demos/RTTISpeed/readme.md: -------------------------------------------------------------------------------- 1 | Demo provided by [Daniele Teti](www.danieleteti.it) 2 | 3 | # RTTISpeed 4 | 5 | A project heavily based on RTTI ([DMVCFramework](https://github.com/danieleteti/delphimvcframework) serializer) compiled with 10.4 Sydney is **30% faster** than the 10.3.3 Rio version. To avoid recompilation, there is also an image showing the numbers. Obviously absolute numbers are not as interesting as the proportions. 6 | 7 | -------------------------------------------------------------------------------- /10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/Project1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/Project1.res -------------------------------------------------------------------------------- /10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_Demo.dpr: -------------------------------------------------------------------------------- 1 | program ScaledGraphicDrawer_Demo; 2 | 3 | uses 4 | Vcl.Forms, 5 | ScaledGraphicDrawer_MainUnit in 'ScaledGraphicDrawer_MainUnit.pas' {ScaledGraphicDrawer_MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | ReportMemoryLeaksOnShutDOwn := True; 13 | Application.CreateForm(TScaledGraphicDrawer_MainForm, ScaledGraphicDrawer_MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_Demo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_Demo.res -------------------------------------------------------------------------------- /10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_MainUnit.pas: -------------------------------------------------------------------------------- 1 | unit ScaledGraphicDrawer_MainUnit; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.pngimage, Vcl.Direct2D, Vcl.ExtCtrls, 8 | Vcl.ComCtrls; 9 | 10 | type 11 | TScaledGraphicDrawer_MainForm = class(TForm) 12 | PaintBox1: TPaintBox; 13 | Image1: TImage; 14 | Label1: TLabel; 15 | Label2: TLabel; 16 | RadioGroup1: TRadioGroup; 17 | TopPnl: TPanel; 18 | LeftPnl: TPanel; 19 | Panel3: TPanel; 20 | RightPnl: TPanel; 21 | Panel5: TPanel; 22 | PageControl1: TPageControl; 23 | TabSheet1: TTabSheet; 24 | TabSheet2: TTabSheet; 25 | BMP: TImage; 26 | Label3: TLabel; 27 | RadioGroup2: TRadioGroup; 28 | procedure FormCreate(Sender: TObject); 29 | procedure PaintBox1Paint(Sender: TObject); 30 | procedure FormDestroy(Sender: TObject); 31 | procedure RadioGroup1Click(Sender: TObject); 32 | procedure FormResize(Sender: TObject); 33 | procedure RadioGroup2Click(Sender: TObject); 34 | private 35 | { Private declarations } 36 | Buffer: TBitmap; 37 | public 38 | { Public declarations } 39 | end; 40 | 41 | var 42 | ScaledGraphicDrawer_MainForm: TScaledGraphicDrawer_MainForm; 43 | 44 | implementation 45 | 46 | {$R *.dfm} 47 | 48 | procedure TScaledGraphicDrawer_MainForm.FormCreate(Sender: TObject); 49 | begin 50 | Buffer := TBitmap.Create; 51 | Buffer.Assign(Image1.Picture.Graphic); 52 | 53 | Buffer.DisableScaledDrawer; 54 | Image1.Picture.Graphic.DisableScaledDrawer; 55 | end; 56 | 57 | procedure TScaledGraphicDrawer_MainForm.FormDestroy(Sender: TObject); 58 | begin 59 | Buffer.Free; 60 | end; 61 | 62 | procedure TScaledGraphicDrawer_MainForm.FormResize(Sender: TObject); 63 | begin 64 | LeftPnl.Width := Width div 2; 65 | RightPnl.Width := Width div 2; 66 | end; 67 | 68 | procedure TScaledGraphicDrawer_MainForm.PaintBox1Paint(Sender: TObject); 69 | begin 70 | PaintBox1.Canvas.StretchDraw(Rect(0, 0, PaintBox1.Width, PaintBox1.Height), Buffer); 71 | end; 72 | 73 | procedure TScaledGraphicDrawer_MainForm.RadioGroup1Click(Sender: TObject); 74 | begin 75 | case RadioGroup1.ItemIndex of 76 | 0: 77 | begin 78 | Buffer.EnableScaledDrawer(TD2DScaledGraphicDrawer); 79 | Image1.Picture.Graphic.EnableScaledDrawer(TD2DScaledGraphicDrawer); 80 | end; 81 | 1: 82 | begin 83 | Buffer.EnableScaledDrawer(TWICScaledGraphicDrawer); 84 | Image1.Picture.Graphic.EnableScaledDrawer(TWICScaledGraphicDrawer); 85 | end; 86 | 2: 87 | begin 88 | Buffer.DisableScaledDrawer; 89 | Image1.Picture.Graphic.DisableScaledDrawer; 90 | end; 91 | end; 92 | Image1.Repaint; 93 | PaintBox1.Repaint; 94 | end; 95 | 96 | procedure TScaledGraphicDrawer_MainForm.RadioGroup2Click(Sender: TObject); 97 | begin 98 | case RadioGroup2.ItemIndex of 99 | 0: BMP.Picture.Graphic.EnableScaledDrawer(TWICScaledGraphicDrawer); 100 | 1: BMP.Picture.Graphic.EnableScaledDrawer(TD2DScaledGraphicDrawer); 101 | 2: BMP.Picture.Graphic.DisableScaledDrawer; 102 | end; 103 | BMP.Repaint; 104 | 105 | end; 106 | 107 | end. 108 | -------------------------------------------------------------------------------- /10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_Png_Demo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/ScaledGraphicDrawer_Png_Bmp32_Demo/ScaledGraphicDrawer_Png_Demo.res -------------------------------------------------------------------------------- /10.4-demos/Scaled_Jelly_Drawer_Demo/Scaled_Jelly_Drawer_Demo.dpr: -------------------------------------------------------------------------------- 1 | program Scaled_Jelly_Drawer_Demo; 2 | 3 | uses 4 | Vcl.Forms, 5 | Scaled_Jelly_Drawer_MainUnit in 'Scaled_Jelly_Drawer_MainUnit.pas' {Scaled_Jelly_Drawer_MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | ReportMemoryLeaksOnShutDown := True; 13 | Application.CreateForm(TScaled_Jelly_Drawer_MainForm, Scaled_Jelly_Drawer_MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /10.4-demos/Scaled_Jelly_Drawer_Demo/Scaled_Jelly_Drawer_Demo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/Scaled_Jelly_Drawer_Demo/Scaled_Jelly_Drawer_Demo.res -------------------------------------------------------------------------------- /10.4-demos/Scaled_Jelly_Drawer_Demo/Scaled_Jelly_Drawer_MainUnit.pas: -------------------------------------------------------------------------------- 1 | unit Scaled_Jelly_Drawer_MainUnit; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Direct2D; 8 | 9 | type 10 | TScaled_Jelly_Drawer_MainForm = class(TForm) 11 | BMP: TImage; 12 | Label2: TLabel; 13 | RadioGroup1: TRadioGroup; 14 | procedure FormCreate(Sender: TObject); 15 | procedure RadioGroup1Click(Sender: TObject); 16 | private 17 | { Private declarations } 18 | public 19 | { Public declarations } 20 | end; 21 | 22 | var 23 | Scaled_Jelly_Drawer_MainForm: TScaled_Jelly_Drawer_MainForm; 24 | 25 | implementation 26 | 27 | {$R *.dfm} 28 | 29 | procedure TScaled_Jelly_Drawer_MainForm.FormCreate(Sender: TObject); 30 | begin 31 | BMP.Picture.Graphic.DisableScaledDrawer; 32 | end; 33 | 34 | procedure TScaled_Jelly_Drawer_MainForm.RadioGroup1Click(Sender: TObject); 35 | begin 36 | case RadioGroup1.ItemIndex of 37 | 0: BMP.Picture.Graphic.EnableScaledDrawer(TWICScaledGraphicDrawer); 38 | 1: BMP.Picture.Graphic.EnableScaledDrawer(TD2DScaledGraphicDrawer); 39 | 2: BMP.Picture.Graphic.DisableScaledDrawer; 40 | end; 41 | BMP.Repaint; 42 | end; 43 | 44 | end. 45 | -------------------------------------------------------------------------------- /10.4-demos/SetOfStrings/MainFormU.dfm: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'SetOfStr DEMO - Daniele Teti' 5 | ClientHeight = 382 6 | ClientWidth = 684 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -16 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | DesignSize = ( 15 | 684 16 | 382) 17 | PixelsPerInch = 96 18 | TextHeight = 19 19 | object btnSimple: TButton 20 | Left = 8 21 | Top = 8 22 | Width = 120 23 | Height = 57 24 | Caption = '1. Initialize' 25 | TabOrder = 0 26 | OnClick = btnSimpleClick 27 | end 28 | object Memo1: TMemo 29 | Left = 8 30 | Top = 71 31 | Width = 668 32 | Height = 303 33 | Anchors = [akLeft, akTop, akRight, akBottom] 34 | TabOrder = 1 35 | end 36 | object btnAddSets: TButton 37 | Left = 134 38 | Top = 8 39 | Width = 120 40 | Height = 57 41 | Caption = '2. Add Sets' 42 | TabOrder = 2 43 | OnClick = btnAddSetsClick 44 | end 45 | object btnIn: TButton 46 | Left = 260 47 | Top = 8 48 | Width = 120 49 | Height = 57 50 | Caption = '3. In Operator' 51 | TabOrder = 3 52 | OnClick = btnInClick 53 | end 54 | object btnIntersect: TButton 55 | Left = 386 56 | Top = 8 57 | Width = 120 58 | Height = 57 59 | Caption = '4. Intersection' 60 | TabOrder = 4 61 | OnClick = btnIntersectClick 62 | end 63 | object btnSubtract: TButton 64 | Left = 512 65 | Top = 8 66 | Width = 120 67 | Height = 57 68 | Caption = '5. Subtract' 69 | TabOrder = 5 70 | OnClick = btnSubtractClick 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /10.4-demos/SetOfStrings/MainFormU.pas: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------- 2 | // Demo written by Daniele Teti 3 | //--------------------------------------------------------------- 4 | unit MainFormU; 5 | 6 | interface 7 | 8 | uses 9 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 10 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; 11 | 12 | type 13 | TMainForm = class(TForm) 14 | btnSimple: TButton; 15 | Memo1: TMemo; 16 | btnAddSets: TButton; 17 | btnIn: TButton; 18 | btnIntersect: TButton; 19 | btnSubtract: TButton; 20 | procedure btnSimpleClick(Sender: TObject); 21 | procedure btnAddSetsClick(Sender: TObject); 22 | procedure btnIntersectClick(Sender: TObject); 23 | procedure btnInClick(Sender: TObject); 24 | procedure btnSubtractClick(Sender: TObject); 25 | private 26 | { Private declarations } 27 | public 28 | { Public declarations } 29 | end; 30 | 31 | var 32 | MainForm: TMainForm; 33 | 34 | implementation 35 | 36 | {$R *.dfm} 37 | 38 | uses SetOfStrU; 39 | 40 | procedure TMainForm.btnInClick(Sender: TObject); 41 | begin 42 | var Set1: SetOfStr := ['one','two','three']; 43 | Memo1.Clear; 44 | Memo1.Lines.Add(BoolToStr('one' in Set1, True)); 45 | Memo1.Lines.Add(BoolToStr('two' in Set1, True)); 46 | Memo1.Lines.Add(BoolToStr('four' in Set1, True)); 47 | end; 48 | 49 | procedure TMainForm.btnIntersectClick(Sender: TObject); 50 | begin 51 | var Set1: SetOfStr := ['one','two','three']; 52 | var Set2: SetOfStr := ['two','three','four']; 53 | Memo1.Lines.Text := (Set1 * Set2).ToString; 54 | end; 55 | 56 | procedure TMainForm.btnSimpleClick(Sender: TObject); 57 | begin 58 | var Set1: SetOfStr := ['Hello','World','World']; 59 | var Set2 := Set1; 60 | Set1 := Set1 + 'NewValue'; 61 | Memo1.Lines.Add('Set1 => '); 62 | Memo1.Lines.Add(Set1.ToString); 63 | Memo1.Lines.Add(''); 64 | Memo1.Lines.Add('Set2 => '); 65 | Memo1.Lines.Add(Set2.ToString); 66 | end; 67 | 68 | procedure TMainForm.btnSubtractClick(Sender: TObject); 69 | begin 70 | var Set1: SetOfStr := ['one','two','three','four']; 71 | var Set2: SetOfStr := ['two','four']; 72 | Memo1.Lines.Text := (Set1 - Set2).ToString; 73 | end; 74 | 75 | procedure TMainForm.btnAddSetsClick(Sender: TObject); 76 | begin 77 | var Set2: SetOfStr := ['one','two','three']; 78 | var Set3: SetOfStr := ['two','three','four']; 79 | var Set4: SetOfStr := Set2 + Set3; 80 | Memo1.Lines.Text := Set4.ToString; 81 | end; 82 | 83 | end. 84 | -------------------------------------------------------------------------------- /10.4-demos/SetOfStrings/SetOfStrU.pas: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------- 2 | // Demo written by Daniele Teti 3 | //--------------------------------------------------------------- 4 | unit SetOfStrU; 5 | 6 | interface 7 | 8 | uses 9 | System.SysUtils, System.Classes; 10 | 11 | type 12 | SetOfStr = record 13 | private 14 | fElements: TStringList; 15 | class procedure RemoveSetElement(const [ref] StringSet: SetOfStr; const Value: String); static; 16 | public 17 | /// Managed Record Requirements 18 | class operator Initialize(out Dest: SetOfStr); 19 | class operator Finalize(var Dest: SetOfStr); 20 | class operator Assign(var Dest: SetOfStr; const [ref] Src: SetOfStr); 21 | 22 | /// Operators 23 | class operator Implicit(Value: TArray): SetOfStr; 24 | class operator In(a: string; b: SetOfStr): Boolean; 25 | class operator Add(a: SetOfStr; b: SetOfStr): SetOfStr; overload; 26 | class operator Add(a: SetOfStr; b: String): SetOfStr; overload; 27 | class operator Subtract(a: SetOfStr; b: SetOfStr): SetOfStr; overload; 28 | class operator Subtract(a: SetOfStr; b: String): SetOfStr; overload; 29 | class operator Multiply(a: SetOfStr; b: SetOfStr): SetOfStr; 30 | 31 | /// Methods 32 | function ToString: string; 33 | function ToArray: TArray; 34 | end; 35 | 36 | implementation 37 | 38 | { SetOfStr } 39 | 40 | function SetOfStr.ToArray: TArray; 41 | begin 42 | Result := fElements.ToStringArray; 43 | end; 44 | 45 | class operator SetOfStr.In(a: string; b: SetOfStr): Boolean; 46 | begin 47 | Result := b.fElements.IndexOf(a) > -1; 48 | end; 49 | 50 | class operator SetOfStr.Initialize(out Dest: SetOfStr); 51 | begin 52 | Dest.fElements := TStringList.Create(dupIgnore, True, False); 53 | end; 54 | 55 | class operator SetOfStr.Finalize(var Dest: SetOfStr); 56 | begin 57 | Dest.fElements.Free; 58 | end; 59 | 60 | class operator SetOfStr.Assign(var Dest: SetOfStr; const [ref] Src: SetOfStr); 61 | begin 62 | Dest.fElements.AddStrings(Src.fElements); 63 | end; 64 | 65 | class operator SetOfStr.Implicit(Value: TArray): SetOfStr; 66 | begin 67 | Result.fElements.AddStrings(Value); 68 | end; 69 | 70 | function SetOfStr.ToString: string; 71 | begin 72 | Result := fElements.Text; 73 | end; 74 | 75 | class operator SetOfStr.Add(a: SetOfStr; b: SetOfStr): SetOfStr; 76 | begin 77 | Result.fElements.AddStrings(a.fElements); 78 | Result.fElements.AddStrings(b.fElements); 79 | end; 80 | 81 | class operator SetOfStr.Add(a: SetOfStr; b: String): SetOfStr; 82 | begin 83 | Result.fElements.AddStrings(a.fElements); 84 | Result.fElements.Add(b); 85 | end; 86 | 87 | class operator SetOfStr.Subtract(a: SetOfStr; b: SetOfStr): SetOfStr; 88 | begin 89 | Result := a; 90 | for var s in b.fElements do 91 | begin 92 | RemoveSetElement(Result,s); 93 | end; 94 | end; 95 | 96 | class operator SetOfStr.Subtract(a: SetOfStr; b: String): SetOfStr; 97 | begin 98 | Result := a; 99 | RemoveSetElement(a,b); 100 | end; 101 | 102 | class operator SetOfStr.Multiply(a: SetOfStr; b: SetOfStr): SetOfStr; 103 | begin 104 | for var s in a.fElements do 105 | begin 106 | if s in b then 107 | begin 108 | Result.fElements.Add(s); 109 | end; 110 | end; 111 | end; 112 | 113 | 114 | class procedure SetOfStr.RemoveSetElement(const [ref] StringSet: SetOfStr; const Value: String); 115 | begin 116 | var lIdx := StringSet.fElements.IndexOf(Value); 117 | if lIdx > -1 then 118 | begin 119 | StringSet.fElements.Delete(lIdx); 120 | end; 121 | end; 122 | 123 | end. 124 | -------------------------------------------------------------------------------- /10.4-demos/SetOfStrings/StringSetDemo.dpr: -------------------------------------------------------------------------------- 1 | program StringSetDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | MainFormU in 'MainFormU.pas' {MainForm}, 6 | SetOfStrU in 'SetOfStrU.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TMainForm, MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /10.4-demos/SetOfStrings/readme.md: -------------------------------------------------------------------------------- 1 | Demo provided by [Daniele Teti](www.danieleteti.it) 2 | 3 | # SetOfStrings 4 | 5 | Show how to create a SetOfStrings using managed record. I plan to create a generic library with the most useful Python built-in structures for Delphi (set, tuple, etc.). -------------------------------------------------------------------------------- /10.4-demos/SydneyDemos.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {BEE5FB5A-7812-4393-A42A-B7D264ACC322} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Default.Personality.12 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /10.4-demos/VCLControlColorsB/VCLColorButtonsUnit1.pas: -------------------------------------------------------------------------------- 1 | unit VCLColorButtonsUnit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.WinXCtrls, 8 | Vcl.StdCtrls, Vcl.Imaging.jpeg; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | Button1: TButton; 13 | Button2: TButton; 14 | Button3: TButton; 15 | Button4: TButton; 16 | Button5: TButton; 17 | Button6: TButton; 18 | Button7: TButton; 19 | Button8: TButton; 20 | RelativePanel1: TRelativePanel; 21 | Image1: TImage; 22 | Button9: TButton; 23 | Button10: TButton; 24 | Button11: TButton; 25 | Label1: TLabel; 26 | private 27 | { Private declarations } 28 | public 29 | { Public declarations } 30 | end; 31 | 32 | var 33 | Form1: TForm1; 34 | 35 | implementation 36 | 37 | {$R *.dfm} 38 | 39 | end. 40 | -------------------------------------------------------------------------------- /10.4-demos/VCLControlColorsB/VCLControlColorsB.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/VCLControlColorsB/VCLControlColorsB.res -------------------------------------------------------------------------------- /10.4-demos/VCLControlColorsB/VCLControlColorsButtons.dpr: -------------------------------------------------------------------------------- 1 | program VCLControlColorsButtons; 2 | 3 | uses 4 | Vcl.Forms, 5 | VCLColorButtonsUnit1 in 'VCLColorButtonsUnit1.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Windows10 SlateGray'); 15 | Application.CreateForm(TForm1, Form1); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /10.4-demos/VCLControlColorsB/VCLControlColorsButtons.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/VCLControlColorsB/VCLControlColorsButtons.res -------------------------------------------------------------------------------- /10.4-demos/VirtualImage_Demo/Project1.dpr: -------------------------------------------------------------------------------- 1 | program Project1; 2 | 3 | uses 4 | Vcl.Forms, 5 | Unit1 in 'Unit1.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TForm1, Form1); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /10.4-demos/VirtualImage_Demo/Project1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/VirtualImage_Demo/Project1.res -------------------------------------------------------------------------------- /10.4-demos/VirtualImage_Demo/Unit1.pas: -------------------------------------------------------------------------------- 1 | unit Unit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.BaseImageCollection, 8 | Vcl.ImageCollection, Vcl.VirtualImage, Vcl.StdCtrls, Vcl.Samples.Spin, 9 | Vcl.ExtCtrls; 10 | 11 | type 12 | TForm1 = class(TForm) 13 | VirtualImage1: TVirtualImage; 14 | ImageCollection1: TImageCollection; 15 | Panel1: TPanel; 16 | SpinEdit1: TSpinEdit; 17 | SpinEdit2: TSpinEdit; 18 | Label2: TLabel; 19 | Label1: TLabel; 20 | CheckBox1: TCheckBox; 21 | CheckBox2: TCheckBox; 22 | procedure CheckBox1Click(Sender: TObject); 23 | procedure CheckBox2Click(Sender: TObject); 24 | procedure SpinEdit1Change(Sender: TObject); 25 | procedure SpinEdit2Change(Sender: TObject); 26 | procedure FormCreate(Sender: TObject); 27 | procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 28 | NewDPI: Integer); 29 | private 30 | { Private declarations } 31 | public 32 | { Public declarations } 33 | end; 34 | 35 | var 36 | Form1: TForm1; 37 | 38 | implementation 39 | 40 | {$R *.dfm} 41 | 42 | procedure TForm1.CheckBox1Click(Sender: TObject); 43 | begin 44 | VirtualImage1.Proportional := CheckBox1.Checked; 45 | end; 46 | 47 | procedure TForm1.CheckBox2Click(Sender: TObject); 48 | begin 49 | VirtualImage1.Center := CheckBox2.Checked; 50 | end; 51 | 52 | procedure TForm1.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, 53 | NewDPI: Integer); 54 | begin 55 | Form1.Caption := 'TVirtualImage - Demo - DPI: ' + IntToStr(Round(Form1.ScaleFactor * 100)) + '%'; 56 | end; 57 | 58 | procedure TForm1.FormCreate(Sender: TObject); 59 | begin 60 | Form1.Caption := 'TVirtualImage - Demo - DPI: ' + IntToStr(Round(Form1.ScaleFactor * 100)) + '%'; 61 | end; 62 | 63 | procedure TForm1.SpinEdit1Change(Sender: TObject); 64 | begin 65 | VirtualImage1.ImageWidth := SpinEdit1.Value; 66 | end; 67 | 68 | procedure TForm1.SpinEdit2Change(Sender: TObject); 69 | begin 70 | VirtualImage1.ImageHeight := SpinEdit2.Value; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /10.4-demos/mangedrecords with Assign/ManagedRecords_101.dpr: -------------------------------------------------------------------------------- 1 | program ManagedRecords_101; 2 | 3 | uses 4 | Vcl.Forms, 5 | ManagedRecordsAssign_form in 'ManagedRecordsAssign_form.pas' {Form5}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm5, Form5); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4-demos/mangedrecords with Assign/ManagedRecords_101_form.dfm: -------------------------------------------------------------------------------- 1 | object Form5: TForm5 2 | Left = 0 3 | Top = 0 4 | Caption = 'MR 101' 5 | ClientHeight = 342 6 | ClientWidth = 761 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -16 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | DesignSize = ( 15 | 761 16 | 342) 17 | PixelsPerInch = 96 18 | TextHeight = 19 19 | object Button1: TButton 20 | Left = 16 21 | Top = 22 22 | Width = 125 23 | Height = 35 24 | Caption = 'Tests' 25 | TabOrder = 0 26 | OnClick = Button1Click 27 | end 28 | object Memo1: TMemo 29 | Left = 160 30 | Top = 21 31 | Width = 583 32 | Height = 297 33 | Anchors = [akLeft, akTop, akRight, akBottom] 34 | TabOrder = 1 35 | end 36 | object Button2: TButton 37 | Left = 16 38 | Top = 64 39 | Width = 125 40 | Height = 35 41 | Caption = 'parameters' 42 | TabOrder = 2 43 | OnClick = Button2Click 44 | end 45 | object Button4: TButton 46 | Left = 16 47 | Top = 176 48 | Width = 125 49 | Height = 35 50 | Caption = 'exception' 51 | TabOrder = 3 52 | OnClick = Button4Click 53 | end 54 | object Button5: TButton 55 | Left = 16 56 | Top = 232 57 | Width = 125 58 | Height = 35 59 | Caption = 'arrays' 60 | TabOrder = 4 61 | OnClick = Button5Click 62 | end 63 | object Button6: TButton 64 | Left = 16 65 | Top = 288 66 | Width = 125 67 | Height = 33 68 | Caption = 'copy constr' 69 | TabOrder = 5 70 | OnClick = Button6Click 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /10.4-demos/mangedrecords with Assign/ManagedRecords_101_form.pas: -------------------------------------------------------------------------------- 1 | unit ManagedRecords_101_form; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Rtti; 8 | 9 | type 10 | TForm5 = class(TForm) 11 | Button1: TButton; 12 | Memo1: TMemo; 13 | Button2: TButton; 14 | Button4: TButton; 15 | Button5: TButton; 16 | Button6: TButton; 17 | procedure Button1Click(Sender: TObject); 18 | procedure Button2Click(Sender: TObject); 19 | procedure Button4Click(Sender: TObject); 20 | procedure Button5Click(Sender: TObject); 21 | procedure Button6Click(Sender: TObject); 22 | private 23 | { Private declarations } 24 | public 25 | 26 | end; 27 | 28 | var 29 | Form5: TForm5; 30 | 31 | procedure Log (const strMessage: string); 32 | 33 | implementation 34 | 35 | {$R *.dfm} 36 | 37 | var 38 | recNo: Integer = 0; 39 | 40 | type 41 | TMyRecord = record 42 | private 43 | FNumber: Integer; 44 | public 45 | Value: Integer; 46 | class operator Initialize (out Dest: TMyRecord); 47 | class operator Finalize(var Dest: TMyRecord); 48 | class operator Assign (var Dest: TMyRecord; 49 | const [ref] Src: TMyRecord); 50 | end; 51 | 52 | { TMyRecord record} 53 | 54 | class operator TMyRecord.Initialize (out Dest: TMyRecord); 55 | begin 56 | Inc (recNo); 57 | Dest.FNumber := recNo; 58 | Dest.Value := 10; 59 | Log('created ' + Dest.FNumber.ToString + ' ' + IntToHex (Integer(Pointer(@Dest)))); 60 | end; 61 | 62 | class operator TMyRecord.Assign (var Dest: TMyRecord; const [ref] Src: TMyRecord); 63 | begin 64 | Dest.Value := Src.Value; 65 | // do not copy recNo! 66 | Log (Src.FNumber.ToString + ' copied to ' + Dest.FNumber.ToString); 67 | end; 68 | 69 | class operator TMyRecord.Finalize(var Dest: TMyRecord); 70 | begin 71 | Log('destroyed ' + Dest.FNumber.ToString + ' ' + IntToHex (Integer(Pointer(@Dest)))); 72 | end; 73 | 74 | 75 | 76 | procedure LocalVarTest; 77 | var 78 | t: TMyRecord; 79 | begin 80 | Log(t.Value.ToString); 81 | end; 82 | 83 | procedure InlineVarTest; 84 | begin 85 | var t: TMyRecord; 86 | Log(t.Value.ToString); 87 | end; 88 | 89 | procedure InlineVarTest2; 90 | var 91 | my1: TMyRecord; 92 | begin 93 | var t := my1; 94 | Log(t.Value.ToString); 95 | 96 | var s: TMyRecord; 97 | Log(s.Value.ToString); 98 | end; 99 | 100 | procedure SimpleAssign; 101 | var 102 | my1, my2: TMyRecord; 103 | begin 104 | my1.Value := 22; 105 | my2 := my1; 106 | end; 107 | 108 | procedure ParByValue (rec: TMyRecord); 109 | begin 110 | Log ('ParByValue'); 111 | // rec.Value := 100; 112 | end; 113 | 114 | procedure ParByConstValue (const rec: TMyRecord); 115 | begin 116 | Log ('ParByConstValue'); 117 | // rec.Value := 100; // cannot assign to const 118 | end; 119 | 120 | procedure ParByRef (var rec: TMyRecord); 121 | begin 122 | Log ('ParByRef'); 123 | rec.Value := 100; 124 | end; 125 | 126 | procedure ParByConstRef (const rec: TMyRecord); 127 | begin 128 | Log ('ParByConstRef'); 129 | // rec.Value := 100; // cannot assign to const 130 | end; 131 | 132 | function ParReturned: TMyRecord; 133 | begin 134 | Log ('ParReturned'); 135 | Result.Value := 42; 136 | end; 137 | 138 | 139 | procedure TForm5.Button1Click(Sender: TObject); 140 | begin 141 | Log ('LocalVarTest'); 142 | LocalVarTest; 143 | Log (''); 144 | 145 | Log ('InlineVarTest'); 146 | InlineVarTest; 147 | Log (''); 148 | 149 | Log ('SimpleAssign'); 150 | SimpleAssign; 151 | Log (''); 152 | 153 | Log ('InlineVarTest2'); 154 | InlineVarTest2; 155 | Log (''); 156 | end; 157 | 158 | 159 | procedure Log(const strMessage: string); 160 | begin 161 | Form5.Memo1.Lines.Add (strMessage); 162 | end; 163 | 164 | procedure TForm5.Button2Click(Sender: TObject); 165 | var 166 | my1: TMyRecord; 167 | begin 168 | Log(my1.Value.ToString); 169 | ParByValue (my1); 170 | Log(my1.Value.ToString); 171 | ParByConstValue (my1); 172 | Log(my1.Value.ToString); 173 | ParByRef (my1); 174 | Log(my1.Value.ToString); 175 | ParByConstRef (my1); 176 | Log(my1.Value.ToString); 177 | my1 := ParReturned; 178 | Log(my1.Value.ToString); 179 | end; 180 | 181 | var 182 | fRaise: Boolean = False; 183 | 184 | type 185 | TMRException = record 186 | x: Integer; 187 | class operator Initialize(out Dest: TMRException); 188 | class operator Finalize(var Dest: TMRException); 189 | end; 190 | 191 | class operator TMRException.Initialize(out Dest: TMRException); 192 | begin 193 | Log('created ' + IntToHex (Integer(Pointer(@Dest)))); 194 | if fRaise then 195 | raise Exception.Create('Error Message'); 196 | end; 197 | 198 | class operator TMRException.Finalize(var Dest: TMRException); 199 | begin 200 | Log('destroyed ' + IntToHex (Integer(Pointer(@Dest)))); 201 | end; 202 | 203 | procedure ExceptionTest; 204 | begin 205 | fRaise := False; 206 | var a: TMRException; 207 | var b: TMRException; 208 | 209 | raise Exception.Create('Error Message'); 210 | end; 211 | 212 | procedure ExceptionInConstructor; 213 | begin 214 | Log ('ExceptionInConstructor'); 215 | fRaise := True; 216 | var d: TMRException; 217 | end; 218 | 219 | procedure TForm5.Button4Click(Sender: TObject); 220 | begin 221 | try 222 | ExceptionTest; 223 | except 224 | ; 225 | end; 226 | 227 | try 228 | ExceptionInConstructor; 229 | except 230 | ; 231 | end; 232 | 233 | end; 234 | 235 | procedure ArrOfRec; 236 | var 237 | a1: array [1..5] of TMyRecord; 238 | begin 239 | Log ('ArrOfRec'); 240 | // use array 241 | for var I := Low(a1) to High (a1) do 242 | Log (a1[I].Value.ToString); 243 | end; 244 | 245 | procedure ArrOfDyn; 246 | var 247 | a2: array of TMyRecord; 248 | begin 249 | Log ('ArrOfDyn'); 250 | SetLength(a2, 5); 251 | for var I := Low(a2) to High (a2) do 252 | Log (a2[I].Value.ToString); 253 | 254 | end; 255 | 256 | procedure TForm5.Button5Click(Sender: TObject); 257 | begin 258 | ArrOfRec; 259 | ArrOfDyn; 260 | end; 261 | 262 | type 263 | TMyRec4 = record 264 | x: Integer; 265 | constructor Create (const recc: TMyRec4); 266 | end; 267 | 268 | constructor TMyRec4.Create (const recc: TMyRec4); 269 | begin 270 | Log ('copy 4 onstructor'); 271 | end; 272 | 273 | type 274 | TMyRec5 = record 275 | x: Integer; 276 | class operator Initialize(out Dest: TMyRec5); 277 | constructor Create (const recc: TMyRec5); 278 | end; 279 | 280 | class operator TMyRec5.Initialize(out Dest: TMyRec5); 281 | begin 282 | Log ('regular 5 constructor'); 283 | end; 284 | 285 | constructor TMyRec5.Create (const recc: TMyRec5); 286 | begin 287 | Log ('MR 5 copy constructor'); 288 | end; 289 | 290 | 291 | 292 | procedure TForm5.Button6Click(Sender: TObject); 293 | var 294 | rc: TRttiContext; 295 | mr2: TMyRec4; 296 | mrc2: TMyRec5; 297 | begin 298 | // copy constructor called twice 299 | var mr1 := TMyRec4.Create (mr2); 300 | 301 | if rc.GetType(TypeInfo(TMyRec4)).TypeKind = tkMRecord then 302 | Log ('managed record') 303 | else if rc.GetType(TypeInfo(TMyRec4)).TypeKind = tkRecord then 304 | Log ('regular record'); 305 | 306 | var mrc55 := TMyRec5.Create (mrc2); 307 | if rc.GetType(TypeInfo(TMyRec5)).TypeKind = tkMRecord then 308 | Log ('managed record') 309 | else if rc.GetType(TypeInfo(TMyRec5)).TypeKind = tkRecord then 310 | Log ('regular record'); 311 | 312 | var mrc56 := mrc2; 313 | end; 314 | 315 | end. 316 | -------------------------------------------------------------------------------- /10.4-demos/mangedrecords with Assign/mr_101.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/mangedrecords with Assign/mr_101.res -------------------------------------------------------------------------------- /10.4-demos/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4-demos/readme.md -------------------------------------------------------------------------------- /10.4.2-demos/ControlListDraw/ControlListDemoFrm1.pas: -------------------------------------------------------------------------------- 1 | unit ControlListDemoFrm1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ControlList, 8 | Vcl.VirtualImage, Vcl.ExtCtrls, Vcl.BaseImageCollection, Vcl.ImageCollection, 9 | Generics.Collections, Vcl.Buttons, System.ImageList, Vcl.ImgList; 10 | 11 | type 12 | TForm1 = class(TForm) 13 | ControlList1: TControlList; 14 | ListBox1: TListBox; 15 | Panel1: TPanel; 16 | Label3: TLabel; 17 | Label4: TLabel; 18 | ImageCollection1: TImageCollection; 19 | Label1: TLabel; 20 | VirtualImage1: TVirtualImage; 21 | ControlListButton1: TControlListButton; 22 | Label2: TLabel; 23 | btnFirst: TSpeedButton; 24 | btnLast: TSpeedButton; 25 | procedure ControlList1BeforeDrawItems(ACanvas: TCanvas; ARect: TRect); 26 | procedure ControlList1BeforeDrawItem(AIndex: Integer; ACanvas: TCanvas; 27 | ARect: TRect; AState: TOwnerDrawState); 28 | procedure ControlListButton1Click(Sender: TObject); 29 | procedure FormCreate(Sender: TObject); 30 | procedure FormDestroy(Sender: TObject); 31 | procedure ControlList1AfterDrawItems(ACanvas: TCanvas; ARect: TRect); 32 | procedure ControlList1EnableItem(const AIndex: Integer; 33 | var AEnabled: Boolean); 34 | procedure btnFirstClick(Sender: TObject); 35 | procedure btnLastClick(Sender: TObject); 36 | procedure ListBox1DblClick(Sender: TObject); 37 | private 38 | { Private declarations } 39 | FClickCount: TDictionary; 40 | FDrawCount: Integer; 41 | public 42 | { Public declarations } 43 | end; 44 | 45 | var 46 | Form1: TForm1; 47 | 48 | implementation 49 | 50 | {$R *.dfm} 51 | 52 | procedure TForm1.btnFirstClick(Sender: TObject); 53 | begin 54 | ControlList1.ItemIndex := 0; 55 | end; 56 | 57 | procedure TForm1.btnLastClick(Sender: TObject); 58 | begin 59 | ControlList1.ItemIndex := ControlList1.ItemCount; 60 | end; 61 | 62 | procedure TForm1.ControlList1AfterDrawItems(ACanvas: TCanvas; ARect: TRect); 63 | begin 64 | Inc(FDrawCount); 65 | ListBox1.Items.Add(Format('--- %3d ---',[FDrawCount])); 66 | ListBox1.Items.EndUpdate; 67 | ListBox1.ItemIndex := pred(ListBox1.Count); 68 | ListBox1.ItemIndex := -1; 69 | end; 70 | 71 | procedure TForm1.ControlList1BeforeDrawItem(AIndex: Integer; ACanvas: TCanvas; 72 | ARect: TRect; AState: TOwnerDrawState); 73 | begin 74 | ListBox1.Items.Add(Format('Drawing #%d',[AIndex])); 75 | Label1.Caption := Format('Index: %d',[AIndex]); 76 | VirtualImage1.ImageIndex := AIndex mod ImageCollection1.Count; 77 | if FClickCount.ContainsKey(AIndex) then 78 | begin 79 | Label2.Caption := Format('Click count: %d',[FClickCount.Items[AIndex]]); 80 | Label2.Visible := True; 81 | end 82 | else 83 | begin 84 | Label2.Visible := False; 85 | end; 86 | end; 87 | 88 | procedure TForm1.ControlList1BeforeDrawItems(ACanvas: TCanvas; ARect: TRect); 89 | begin 90 | ListBox1.Items.BeginUpdate; 91 | end; 92 | 93 | procedure TForm1.ControlList1EnableItem(const AIndex: Integer; 94 | var AEnabled: Boolean); 95 | begin 96 | AEnabled := AIndex mod 10 <> 0; 97 | end; 98 | 99 | procedure TForm1.ControlListButton1Click(Sender: TObject); 100 | begin 101 | var idx := ControlList1.ItemIndex; 102 | var cnt := 1; 103 | if FClickCount.ContainsKey(idx) then 104 | cnt := FClickCount.Items[idx] + 1; 105 | FClickCount.AddOrSetValue(idx, cnt); 106 | ControlList1.Refresh; // must repaint everything 107 | end; 108 | 109 | procedure TForm1.FormCreate(Sender: TObject); 110 | begin 111 | FClickCount := TDictionary.Create; 112 | FDrawCount := 0; 113 | end; 114 | 115 | procedure TForm1.FormDestroy(Sender: TObject); 116 | begin 117 | FClickCount.Free; 118 | end; 119 | 120 | procedure TForm1.ListBox1DblClick(Sender: TObject); 121 | begin 122 | ListBox1.Clear; 123 | FDrawCount := 0; 124 | FClickCount.Clear; 125 | ControlList1.Refresh; 126 | ListBox1.ItemIndex := -1; 127 | Panel1.SetFocus; 128 | end; 129 | 130 | end. 131 | -------------------------------------------------------------------------------- /10.4.2-demos/ControlListDraw/ControlListDrawDemo.dpr: -------------------------------------------------------------------------------- 1 | program ControlListDrawDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | ControlListDemoFrm1 in 'ControlListDemoFrm1.pas' {Form1}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | ReportMemoryLeaksOnShutdown := True; 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | TStyleManager.TrySetStyle('Glow'); 16 | Application.CreateForm(TForm1, Form1); 17 | Application.Run; 18 | end. 19 | -------------------------------------------------------------------------------- /10.4.2-demos/ControlListDraw/ControlListDrawDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4.2-demos/ControlListDraw/ControlListDrawDemo.res -------------------------------------------------------------------------------- /10.4.2-demos/ControlListLiveBinding/ControlListLiveBindingDemo.dpr: -------------------------------------------------------------------------------- 1 | program ControlListLiveBindingDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | ControlListLiveBindingUnit1 in 'ControlListLiveBindingUnit1.pas' {frmCtrlListDemo3}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmCtrlListDemo3, frmCtrlListDemo3); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4.2-demos/ControlListLiveBinding/ControlListLiveBindingDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4.2-demos/ControlListLiveBinding/ControlListLiveBindingDemo.res -------------------------------------------------------------------------------- /10.4.2-demos/ControlListLiveBinding/ControlListLiveBindingUnit1.dfm: -------------------------------------------------------------------------------- 1 | object frmCtrlListDemo3: TfrmCtrlListDemo3 2 | Left = 0 3 | Top = 0 4 | Caption = 'TControlList LiveBindings Demo' 5 | ClientHeight = 442 6 | ClientWidth = 602 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Position = poScreenCenter 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object ControlList1: TControlList 18 | Left = 0 19 | Top = 82 20 | Width = 602 21 | Height = 360 22 | Align = alClient 23 | ItemCount = 200 24 | ItemWidth = 125 25 | ItemHeight = 50 26 | ItemIndex = 0 27 | ItemMargins.Left = 0 28 | ItemMargins.Top = 0 29 | ItemMargins.Right = 0 30 | ItemMargins.Bottom = 0 31 | ColumnLayout = cltMultiLeftToRight 32 | ItemSelectionOptions.HotColorAlpha = 50 33 | ItemSelectionOptions.SelectedColorAlpha = 70 34 | ItemSelectionOptions.FocusedColorAlpha = 80 35 | ParentColor = False 36 | TabOrder = 0 37 | OnBeforeDrawItem = ControlList1BeforeDrawItem 38 | OnItemClick = ControlList1ItemClick 39 | object lblColorValue: TLabel 40 | AlignWithMargins = True 41 | Left = 10 42 | Top = 25 43 | Width = 36 44 | Height = 13 45 | Margins.Left = 10 46 | Margins.Top = 2 47 | Margins.Right = 2 48 | Margins.Bottom = 2 49 | Caption = '755384' 50 | ShowAccelChar = False 51 | Transparent = True 52 | WordWrap = True 53 | end 54 | object lblHeader: TLabel 55 | Left = 10 56 | Top = 6 57 | Width = 84 58 | Height = 13 59 | Caption = 'Darkgoldenrod' 60 | Font.Charset = DEFAULT_CHARSET 61 | Font.Color = clWindowText 62 | Font.Height = -11 63 | Font.Name = 'Tahoma' 64 | Font.Style = [fsBold] 65 | ParentFont = False 66 | Transparent = True 67 | end 68 | object lblIndex: TLabel 69 | Left = 88 70 | Top = 23 71 | Width = 27 72 | Height = 13 73 | Alignment = taRightJustify 74 | Anchors = [akTop, akRight] 75 | Caption = 'Idx #' 76 | ExplicitLeft = 113 77 | end 78 | end 79 | object Panel1: TPanel 80 | Left = 0 81 | Top = 0 82 | Width = 602 83 | Height = 82 84 | Align = alTop 85 | Caption = ' ' 86 | Font.Charset = DEFAULT_CHARSET 87 | Font.Color = clWindowText 88 | Font.Height = -16 89 | Font.Name = 'Tahoma' 90 | Font.Style = [] 91 | ParentFont = False 92 | TabOrder = 1 93 | object Label1: TLabel 94 | Left = 12 95 | Top = 9 96 | Width = 96 97 | Height = 19 98 | Caption = 'Record Count' 99 | end 100 | object btnJump: TSpeedButton 101 | Left = 195 102 | Top = 28 103 | Width = 46 104 | Height = 27 105 | Caption = 'Jump' 106 | OnClick = btnJumpClick 107 | end 108 | object Label2: TLabel 109 | Left = 140 110 | Top = 9 111 | Width = 78 112 | Height = 19 113 | Caption = 'Item Index' 114 | end 115 | object Label3: TLabel 116 | Left = 265 117 | Top = 9 118 | Width = 84 119 | Height = 19 120 | Caption = 'Item Height' 121 | end 122 | object Label4: TLabel 123 | Left = 369 124 | Top = 9 125 | Width = 79 126 | Height = 19 127 | Caption = 'Item Width' 128 | end 129 | object Label5: TLabel 130 | Left = 463 131 | Top = 9 132 | Width = 93 133 | Height = 19 134 | Caption = 'Item Margins' 135 | end 136 | object numCount: TNumberBox 137 | Left = 12 138 | Top = 28 139 | Width = 96 140 | Height = 27 141 | Alignment = taCenter 142 | MaxValue = 200.000000000000000000 143 | TabOrder = 0 144 | Value = 200.000000000000000000 145 | SpinButtonOptions.Placement = nbspInline 146 | end 147 | object numIndex: TNumberBox 148 | Left = 128 149 | Top = 28 150 | Width = 65 151 | Height = 27 152 | Alignment = taCenter 153 | MaxValue = 200.000000000000000000 154 | TabOrder = 1 155 | SpinButtonOptions.Placement = nbspInline 156 | end 157 | object NumberBox2: TNumberBox 158 | Left = 369 159 | Top = 28 160 | Width = 79 161 | Height = 27 162 | Alignment = taCenter 163 | MaxValue = 200.000000000000000000 164 | TabOrder = 2 165 | Value = 125.000000000000000000 166 | SpinButtonOptions.Placement = nbspInline 167 | end 168 | object NumberBox3: TNumberBox 169 | Left = 463 170 | Top = 28 171 | Width = 93 172 | Height = 27 173 | Alignment = taCenter 174 | MaxValue = 200.000000000000000000 175 | TabOrder = 3 176 | SpinButtonOptions.Placement = nbspInline 177 | end 178 | object NumberBox1: TNumberBox 179 | Left = 265 180 | Top = 28 181 | Width = 84 182 | Height = 27 183 | Alignment = taCenter 184 | MaxValue = 200.000000000000000000 185 | TabOrder = 4 186 | Value = 50.000000000000000000 187 | SpinButtonOptions.Placement = nbspInline 188 | end 189 | end 190 | object PrototypeBindSource1: TPrototypeBindSource 191 | AutoActivate = True 192 | AutoEdit = False 193 | AutoPost = False 194 | FieldDefs = < 195 | item 196 | Name = 'ColorsName1' 197 | Generator = 'ColorsNames' 198 | ReadOnly = True 199 | end 200 | item 201 | Name = 'Color1' 202 | FieldType = ftUInteger 203 | Generator = 'Colors' 204 | ReadOnly = True 205 | end> 206 | ScopeMappings = <> 207 | Left = 116 208 | Top = 179 209 | end 210 | object BindingsList1: TBindingsList 211 | Methods = <> 212 | OutputConverters = <> 213 | Left = 114 214 | Top = 125 215 | object LinkPropertyToFieldCaption2: TLinkPropertyToField 216 | Category = 'Quick Bindings' 217 | DataSource = PrototypeBindSource1 218 | FieldName = 'Color1' 219 | Component = lblColorValue 220 | ComponentProperty = 'Caption' 221 | end 222 | object LinkGridToDataSourcePrototypeBindSource1: TLinkGridToDataSource 223 | Category = 'Quick Bindings' 224 | DataSource = PrototypeBindSource1 225 | GridControl = ControlList1 226 | Columns = <> 227 | end 228 | object LinkControlToPropertyItemCount: TLinkControlToProperty 229 | Category = 'Quick Bindings' 230 | Control = numCount 231 | Track = True 232 | Component = ControlList1 233 | ComponentProperty = 'ItemCount' 234 | end 235 | object LinkPropertyToFieldCaption: TLinkPropertyToField 236 | Category = 'Quick Bindings' 237 | DataSource = PrototypeBindSource1 238 | FieldName = 'ColorsName1' 239 | Component = lblHeader 240 | ComponentProperty = 'Caption' 241 | end 242 | object LinkControlToPropertyMaxValue: TLinkControlToProperty 243 | Category = 'Quick Bindings' 244 | Control = numCount 245 | Track = True 246 | Component = numIndex 247 | ComponentProperty = 'MaxValue' 248 | InitializeControlValue = False 249 | end 250 | object LinkControlToPropertyItemIndex: TLinkControlToProperty 251 | Category = 'Quick Bindings' 252 | Control = numIndex 253 | Track = True 254 | Component = ControlList1 255 | ComponentProperty = 'ItemIndex' 256 | end 257 | object LinkControlToPropertyItemHeight: TLinkControlToProperty 258 | Category = 'Quick Bindings' 259 | Control = NumberBox1 260 | Track = True 261 | Component = ControlList1 262 | ComponentProperty = 'ItemHeight' 263 | end 264 | object LinkControlToPropertyItemWidth: TLinkControlToProperty 265 | Category = 'Quick Bindings' 266 | Control = NumberBox2 267 | Track = True 268 | Component = ControlList1 269 | ComponentProperty = 'ItemWidth' 270 | end 271 | object LinkControlToPropertyItemMarginsTop: TLinkControlToProperty 272 | Category = 'Quick Bindings' 273 | Control = NumberBox3 274 | Track = True 275 | Component = ControlList1 276 | ComponentProperty = 'ItemMargins.Top' 277 | end 278 | object LinkControlToPropertyItemMarginsRight: TLinkControlToProperty 279 | Category = 'Quick Bindings' 280 | Control = NumberBox3 281 | Track = True 282 | Component = ControlList1 283 | ComponentProperty = 'ItemMargins.Right' 284 | InitializeControlValue = False 285 | end 286 | object LinkControlToPropertyItemMarginsLeft: TLinkControlToProperty 287 | Category = 'Quick Bindings' 288 | Control = NumberBox3 289 | Track = True 290 | Component = ControlList1 291 | ComponentProperty = 'ItemMargins.Left' 292 | InitializeControlValue = False 293 | end 294 | object LinkControlToPropertyItemMarginsBottom: TLinkControlToProperty 295 | Category = 'Quick Bindings' 296 | Control = NumberBox3 297 | Track = True 298 | Component = ControlList1 299 | ComponentProperty = 'ItemMargins.Bottom' 300 | InitializeControlValue = False 301 | end 302 | end 303 | end 304 | -------------------------------------------------------------------------------- /10.4.2-demos/ControlListLiveBinding/ControlListLiveBindingUnit1.pas: -------------------------------------------------------------------------------- 1 | unit ControlListLiveBindingUnit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.Bind.GenData, 8 | Data.Bind.EngExt, Vcl.Bind.DBEngExt, Vcl.Bind.ControlList, System.Rtti, 9 | System.Bindings.Outputs, Vcl.Bind.Editors, Data.Bind.Components, 10 | Data.Bind.Grid, Vcl.VirtualImage, Vcl.StdCtrls, Data.Bind.ObjectScope, 11 | Vcl.ControlList, Data.Bind.Controls, Vcl.NumberBox, Vcl.Buttons, 12 | Vcl.Bind.Navigator, Vcl.ExtCtrls; 13 | 14 | type 15 | TfrmCtrlListDemo3 = class(TForm) 16 | ControlList1: TControlList; 17 | lblColorValue: TLabel; 18 | lblHeader: TLabel; 19 | lblIndex: TLabel; 20 | Panel1: TPanel; 21 | numCount: TNumberBox; 22 | Label1: TLabel; 23 | PrototypeBindSource1: TPrototypeBindSource; 24 | BindingsList1: TBindingsList; 25 | LinkPropertyToFieldCaption2: TLinkPropertyToField; 26 | LinkGridToDataSourcePrototypeBindSource1: TLinkGridToDataSource; 27 | LinkControlToPropertyItemCount: TLinkControlToProperty; 28 | LinkPropertyToFieldCaption: TLinkPropertyToField; 29 | numIndex: TNumberBox; 30 | LinkControlToPropertyMaxValue: TLinkControlToProperty; 31 | btnJump: TSpeedButton; 32 | Label2: TLabel; 33 | LinkControlToPropertyItemIndex: TLinkControlToProperty; 34 | NumberBox1: TNumberBox; 35 | LinkControlToPropertyItemHeight: TLinkControlToProperty; 36 | NumberBox2: TNumberBox; 37 | LinkControlToPropertyItemWidth: TLinkControlToProperty; 38 | NumberBox3: TNumberBox; 39 | LinkControlToPropertyItemMarginsTop: TLinkControlToProperty; 40 | LinkControlToPropertyItemMarginsRight: TLinkControlToProperty; 41 | LinkControlToPropertyItemMarginsLeft: TLinkControlToProperty; 42 | LinkControlToPropertyItemMarginsBottom: TLinkControlToProperty; 43 | Label3: TLabel; 44 | Label4: TLabel; 45 | Label5: TLabel; 46 | procedure ControlList1BeforeDrawItem(AIndex: Integer; ACanvas: TCanvas; 47 | ARect: TRect; AState: TOwnerDrawState); 48 | procedure ControlList1ItemClick(Sender: TObject); 49 | procedure btnJumpClick(Sender: TObject); 50 | private 51 | { Private declarations } 52 | public 53 | { Public declarations } 54 | end; 55 | 56 | var 57 | frmCtrlListDemo3: TfrmCtrlListDemo3; 58 | 59 | implementation 60 | 61 | {$R *.dfm} 62 | 63 | procedure TfrmCtrlListDemo3.btnJumpClick(Sender: TObject); 64 | begin 65 | if ControlList1.ItemIndex > ControlList1.ItemCount div 2 then 66 | ControlList1.ItemIndex := 0 67 | else 68 | ControlList1.ItemIndex := ControlList1.ItemCount; 69 | end; 70 | 71 | procedure TfrmCtrlListDemo3.ControlList1BeforeDrawItem(AIndex: Integer; 72 | ACanvas: TCanvas; ARect: TRect; AState: TOwnerDrawState); 73 | begin 74 | ACanvas.Brush.Color := StrToInt(lblColorValue.Caption); 75 | var BaseWidth := 5; 76 | var PenWidth: Integer := BaseWidth; 77 | ACanvas.Pen.Width := PenWidth; 78 | if odSelected in AState then 79 | ACanvas.Pen.Color := clWindowText 80 | else 81 | ACanvas.Pen.Color := clWindow; 82 | ACanvas.Rectangle(ARect); 83 | lblIndex.Caption := Format('#%d',[AIndex]); 84 | end; 85 | 86 | procedure TfrmCtrlListDemo3.ControlList1ItemClick(Sender: TObject); 87 | begin 88 | numIndex.Value := ControlList1.ItemIndex; 89 | end; 90 | 91 | end. 92 | -------------------------------------------------------------------------------- /10.4.2-demos/EdgeView/EdgeMain.dfm: -------------------------------------------------------------------------------- 1 | object EdgeViewForm: TEdgeViewForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'EdgeView Demo' 5 | ClientHeight = 525 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object EdgeBrowser1: TEdgeBrowser 18 | Left = 0 19 | Top = 57 20 | Width = 635 21 | Height = 319 22 | Align = alClient 23 | TabOrder = 0 24 | OnExecuteScript = EdgeBrowser1ExecuteScript 25 | ExplicitTop = 89 26 | end 27 | object Panel1: TPanel 28 | Left = 0 29 | Top = 0 30 | Width = 635 31 | Height = 57 32 | Align = alTop 33 | BevelOuter = bvNone 34 | Caption = ' ' 35 | TabOrder = 1 36 | DesignSize = ( 37 | 635 38 | 57) 39 | object btnGo: TButton 40 | Left = 8 41 | Top = 8 42 | Width = 41 43 | Height = 25 44 | Caption = 'Go' 45 | TabOrder = 0 46 | OnClick = btnGoClick 47 | end 48 | object Edit1: TEdit 49 | Left = 55 50 | Top = 10 51 | Width = 570 52 | Height = 21 53 | Anchors = [akLeft, akTop, akRight] 54 | TabOrder = 1 55 | Text = 'https://embarcadero.com' 56 | end 57 | end 58 | object PageControl1: TPageControl 59 | Left = 0 60 | Top = 376 61 | Width = 635 62 | Height = 149 63 | ActivePage = TabSheet1 64 | Align = alBottom 65 | TabOrder = 2 66 | object TabSheet1: TTabSheet 67 | Caption = 'JavaScript' 68 | object memoJavaScript: TMemo 69 | Left = 88 70 | Top = 0 71 | Width = 539 72 | Height = 121 73 | Align = alClient 74 | Lines.Strings = ( 75 | 'alert("hello Delphi!");') 76 | TabOrder = 0 77 | end 78 | object Panel3: TPanel 79 | Left = 0 80 | Top = 0 81 | Width = 88 82 | Height = 121 83 | Align = alLeft 84 | BevelOuter = bvNone 85 | Caption = ' ' 86 | TabOrder = 1 87 | object btnExecuteScript: TButton 88 | Left = 7 89 | Top = 2 90 | Width = 75 91 | Height = 25 92 | Caption = 'Exec Script' 93 | TabOrder = 0 94 | OnClick = btnExecuteScriptClick 95 | end 96 | end 97 | end 98 | object TabSheet3: TTabSheet 99 | Caption = 'Source' 100 | ImageIndex = 2 101 | object Panel5: TPanel 102 | Left = 0 103 | Top = 0 104 | Width = 88 105 | Height = 121 106 | Align = alLeft 107 | BevelOuter = bvNone 108 | Caption = ' ' 109 | TabOrder = 0 110 | object btnViewSource: TButton 111 | Left = 4 112 | Top = 4 113 | Width = 78 114 | Height = 25 115 | Caption = 'View Source' 116 | TabOrder = 0 117 | OnClick = btnViewSourceClick 118 | end 119 | object btnSetSource: TButton 120 | Left = 4 121 | Top = 35 122 | Width = 78 123 | Height = 25 124 | Caption = 'Set Source' 125 | TabOrder = 1 126 | OnClick = btnSetSourceClick 127 | end 128 | end 129 | object memoHTML: TMemo 130 | Left = 88 131 | Top = 0 132 | Width = 539 133 | Height = 121 134 | Align = alClient 135 | ScrollBars = ssBoth 136 | TabOrder = 1 137 | WordWrap = False 138 | end 139 | end 140 | end 141 | end 142 | -------------------------------------------------------------------------------- /10.4.2-demos/EdgeView/EdgeMain.pas: -------------------------------------------------------------------------------- 1 | unit EdgeMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, WebView2, Winapi.ActiveX, 8 | Vcl.StdCtrls, Vcl.Edge, Vcl.ExtCtrls, Vcl.ComCtrls; 9 | 10 | type 11 | TEdgeViewForm = class(TForm) 12 | EdgeBrowser1: TEdgeBrowser; 13 | btnGo: TButton; 14 | Edit1: TEdit; 15 | btnExecuteScript: TButton; 16 | btnViewSource: TButton; 17 | Panel1: TPanel; 18 | Panel3: TPanel; 19 | PageControl1: TPageControl; 20 | TabSheet1: TTabSheet; 21 | TabSheet3: TTabSheet; 22 | memoJavaScript: TMemo; 23 | Panel5: TPanel; 24 | memoHTML: TMemo; 25 | btnSetSource: TButton; 26 | procedure btnGoClick(Sender: TObject); 27 | procedure btnExecuteScriptClick(Sender: TObject); 28 | procedure btnViewSourceClick(Sender: TObject); 29 | procedure EdgeBrowser1ExecuteScript(Sender: TCustomEdgeBrowser; 30 | AResult: HRESULT; const AResultObjectAsJson: string); 31 | procedure FormCreate(Sender: TObject); 32 | procedure btnSetSourceClick(Sender: TObject); 33 | private 34 | { Private declarations } 35 | public 36 | { Public declarations } 37 | end; 38 | 39 | var 40 | EdgeViewForm: TEdgeViewForm; 41 | 42 | implementation 43 | 44 | {$R *.dfm} 45 | 46 | uses 47 | System.NetEncoding; 48 | 49 | procedure TEdgeViewForm.EdgeBrowser1ExecuteScript(Sender: TCustomEdgeBrowser; 50 | AResult: HRESULT; const AResultObjectAsJson: string); 51 | begin 52 | if AResultObjectAsJson <> 'null' then 53 | memoHTML.Text := TNetEncoding.URL.Decode(AResultObjectAsJson).DeQuotedString('"'); 54 | end; 55 | 56 | procedure TEdgeViewForm.btnGoClick(Sender: TObject); 57 | begin 58 | EdgeBrowser1.Navigate(memoJavaScript.Text); 59 | end; 60 | 61 | procedure TEdgeViewForm.btnExecuteScriptClick(Sender: TObject); 62 | begin 63 | EdgeBrowser1.ExecuteScript(memoJavaScript.Text); 64 | end; 65 | 66 | procedure TEdgeViewForm.btnViewSourceClick(Sender: TObject); 67 | begin 68 | EdgeBrowser1.ExecuteScript('encodeURI(document.documentElement.outerHTML)'); 69 | end; 70 | 71 | procedure TEdgeViewForm.btnSetSourceClick(Sender: TObject); 72 | begin 73 | EdgeBrowser1.NavigateToString(memoHTML.Text); 74 | end; 75 | 76 | procedure TEdgeViewForm.FormCreate(Sender: TObject); 77 | begin 78 | EdgeBrowser1.Navigate('https://embarcadero.com'); 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /10.4.2-demos/EdgeView/EdgeView.dpr: -------------------------------------------------------------------------------- 1 | program EdgeView; 2 | 3 | uses 4 | Vcl.Forms, 5 | EdgeMain in 'EdgeMain.pas' {EdgeViewForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TEdgeViewForm, EdgeViewForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4.2-demos/EdgeView/EdgeView.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4.2-demos/EdgeView/EdgeView.res -------------------------------------------------------------------------------- /10.4.2-demos/NumberBoxDemo/NumberBoxDemo.dpr: -------------------------------------------------------------------------------- 1 | program NumberBoxDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | NumberBoxDemo_Unit1 in 'NumberBoxDemo_Unit1.pas' {NumBoxDemo}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Glow'); 15 | Application.CreateForm(TNumBoxDemo, NumBoxDemo); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /10.4.2-demos/NumberBoxDemo/NumberBoxDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4.2-demos/NumberBoxDemo/NumberBoxDemo.res -------------------------------------------------------------------------------- /10.4.2-demos/NumberBoxDemo/NumberBoxDemo_Unit1.pas: -------------------------------------------------------------------------------- 1 | unit NumberBoxDemo_Unit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, 7 | Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.Bind.EngExt, 8 | Vcl.Bind.DBEngExt, System.Rtti, System.Bindings.Outputs, Vcl.Bind.Editors, 9 | Vcl.StdCtrls, Vcl.ExtCtrls, Data.Bind.Components, Vcl.NumberBox, Vcl.Menus; 10 | 11 | type 12 | TNumBoxDemo = class(TForm) 13 | NumberBox1: TNumberBox; 14 | CheckBox1: TCheckBox; 15 | BindingsList1: TBindingsList; 16 | LinkControlToPropertyAcceptExpressions: TLinkControlToProperty; 17 | CheckBox2: TCheckBox; 18 | LinkControlToPropertyAutoSize: TLinkControlToProperty; 19 | rdoPlacement: TRadioGroup; 20 | GroupBox1: TGroupBox; 21 | ColorListBox1: TColorListBox; 22 | LinkControlToPropertyColor: TLinkControlToProperty; 23 | CheckBox3: TCheckBox; 24 | LinkControlToPropertyAutoSelect: TLinkControlToProperty; 25 | rdoMode: TRadioGroup; 26 | rdoCurrencyFormat: TRadioGroup; 27 | NumberBox2: TNumberBox; 28 | LinkControlToPropertyDecimal: TLinkControlToProperty; 29 | Label1: TLabel; 30 | NumberBox3: TNumberBox; 31 | Label2: TLabel; 32 | NumberBox4: TNumberBox; 33 | Label3: TLabel; 34 | LinkControlToPropertyMaxLength: TLinkControlToProperty; 35 | NumberBox5: TNumberBox; 36 | Label4: TLabel; 37 | LinkControlToPropertySmallStep: TLinkControlToProperty; 38 | NumberBox6: TNumberBox; 39 | Label5: TLabel; 40 | LinkControlToPropertyMaxValue: TLinkControlToProperty; 41 | NumberBox7: TNumberBox; 42 | Label6: TLabel; 43 | LinkControlToPropertyMinValue: TLinkControlToProperty; 44 | Label7: TLabel; 45 | CheckBox4: TCheckBox; 46 | LinkControlToPropertyReadOnly: TLinkControlToProperty; 47 | NumberBox8: TNumberBox; 48 | LinkControlToPropertySpinButtonOptionsButtonWidth: TLinkControlToProperty; 49 | NumberBox9: TNumberBox; 50 | LinkControlToPropertySpinButtonOptionsArrowWidth: TLinkControlToProperty; 51 | Label8: TLabel; 52 | rdoAlign: TRadioGroup; 53 | Label9: TLabel; 54 | Label10: TLabel; 55 | NumberBox10: TNumberBox; 56 | LinkControlToPropertySpinButtonOptionsRepeatTimerInterval: TLinkControlToProperty; 57 | CheckBox5: TCheckBox; 58 | LinkControlToPropertySpinButtonOptionsShowInlineDividers: TLinkControlToProperty; 59 | CheckBox6: TCheckBox; 60 | LinkControlToPropertyUseMouseWheel: TLinkControlToProperty; 61 | CheckBox7: TCheckBox; 62 | LinkControlToPropertyUseNaNValue: TLinkControlToProperty; 63 | CheckBox8: TCheckBox; 64 | LinkControlToPropertyUseUpDownKeys: TLinkControlToProperty; 65 | CheckBox9: TCheckBox; 66 | LinkControlToPropertyWrap: TLinkControlToProperty; 67 | ColorBox1: TColorBox; 68 | Label11: TLabel; 69 | ColorBox2: TColorBox; 70 | Label12: TLabel; 71 | ColorBox3: TColorBox; 72 | Label13: TLabel; 73 | ColorBox4: TColorBox; 74 | Label14: TLabel; 75 | LinkControlToPropertySpinButtonOptionsArrowColor: TLinkControlToProperty; 76 | LinkControlToPropertySpinButtonOptionsArrowHotColor: TLinkControlToProperty; 77 | LinkControlToPropertySpinButtonOptionsArrowPressedColor: TLinkControlToProperty; 78 | LinkControlToPropertySpinButtonOptionsArrowDisabledColor: TLinkControlToProperty; 79 | LinkControlToPropertyLargeStep: TLinkControlToProperty; 80 | ComboBox1: TComboBox; 81 | Label15: TLabel; 82 | MainMenu1: TMainMenu; 83 | mnuStyle: TMenuItem; 84 | NumberBox11: TNumberBox; 85 | LinkControlToPropertyFontHeight: TLinkControlToProperty; 86 | Label16: TLabel; 87 | ComboBox2: TComboBox; 88 | Exit1: TMenuItem; 89 | Label17: TLabel; 90 | procedure FormCreate(Sender: TObject); 91 | procedure rdoPlacementClick(Sender: TObject); 92 | procedure rdoModeClick(Sender: TObject); 93 | procedure rdoCurrencyFormatClick(Sender: TObject); 94 | procedure rdoAlignClick(Sender: TObject); 95 | procedure StyleMenuItemClick(Sender: TObject); 96 | procedure Exit1Click(Sender: TObject); 97 | procedure ComboBox2Change(Sender: TObject); 98 | procedure ComboBox1Change(Sender: TObject); 99 | private 100 | { Private declarations } 101 | procedure unused; 102 | public 103 | { Public declarations } 104 | end; 105 | 106 | var 107 | NumBoxDemo: TNumBoxDemo; 108 | 109 | implementation 110 | 111 | {$R *.dfm} 112 | 113 | uses 114 | TypInfo, VCL.Themes, IOUtils, Generics.Collections; 115 | 116 | procedure TNumBoxDemo.ComboBox1Change(Sender: TObject); 117 | begin 118 | NumberBox1.Mode := nbmCurrency; 119 | NumberBox1.CurrencyString := ComboBox1.Text; 120 | rdoMode.ItemIndex := ord(nbmCurrency); 121 | end; 122 | 123 | procedure TNumBoxDemo.ComboBox2Change(Sender: TObject); 124 | begin 125 | NumberBox1.AcceptExpressions := True; 126 | NumberBox1.SetFocus; 127 | NumberBox1.Text := ComboBox2.Text; 128 | end; 129 | 130 | procedure TNumBoxDemo.Exit1Click(Sender: TObject); 131 | begin 132 | Application.Terminate; 133 | end; 134 | 135 | procedure TNumBoxDemo.FormCreate(Sender: TObject); 136 | begin 137 | for var nbsp := Low(TNumberBoxSpinButtonPlacement) to High(TNumberBoxSpinButtonPlacement) do 138 | rdoPlacement.Items.Add( TRttiEnumerationType.GetName(nbsp) ); 139 | rdoPlacement.ItemIndex := Ord(NumberBox1.SpinButtonOptions.Placement); 140 | for var nbm := Low(TNumberBoxMode) to High(TNumberBoxMode) do 141 | rdoMode.Items.Add( TRttiEnumerationType.GetName(nbm) ); 142 | rdoMode.ItemIndex := Ord(NumberBox1.Mode); 143 | for var algn := Low(TAlignment) to High(TAlignment) do 144 | rdoAlign.Items.Add( TRttiEnumerationType.GetName(algn) ); 145 | rdoAlign.ItemIndex := Ord(NumberBox1.Alignment); 146 | 147 | 148 | for var sname in TStyleManager.StyleNames do 149 | begin 150 | var styleItem := TMenuItem.Create(mnuStyle); 151 | styleItem.Caption := sName; 152 | styleItem.OnClick := StyleMenuItemClick; 153 | mnuStyle.Add(styleItem); 154 | end; 155 | var Authors := TStringList.Create; 156 | for var fname in TDirectory.GetFiles('C:\Users\Public\Documents\Embarcadero\Studio\21.0\Styles','*.vsf') do 157 | begin 158 | var info: TStyleInfo; 159 | if TStyleManager.IsValidStyle(fname, info) then 160 | begin 161 | var Author: string; 162 | if info.Author.StartsWith('Embarcadero') then 163 | Author := 'Embarcadero' 164 | else 165 | Author := info.Author; 166 | if info.Name.StartsWith('Metro') or info.Name.StartsWith('Tablet') or info.Name.StartsWith('Windows') then 167 | Author := 'Windows'; 168 | authors.AddPair(Author, info.Name); 169 | try 170 | TStyleManager.LoadFromFile(fname); 171 | except on EDuplicateStyleException do 172 | 173 | end; 174 | end; 175 | end; 176 | authors.Sort; 177 | var authorItem: TMenuItem := nil; 178 | for var i := 0 to pred(authors.Count) do 179 | begin 180 | if not Assigned(authorItem) or (authorItem.Caption <> authors.Names[i]) then 181 | begin 182 | authorItem := TMenuItem.Create(mnuStyle); 183 | authorItem.AutoHotkeys := TMenuItemAutoFlag.maManual; 184 | authorItem.Caption := authors.Names[i]; 185 | mnuStyle.Add(authorItem); 186 | end; 187 | var styleItem := TMenuItem.Create(mnuStyle); 188 | styleItem.AutoHotkeys := TMenuItemAutoFlag.maManual; 189 | styleItem.Caption := Authors.ValueFromIndex[i]; 190 | styleItem.OnClick := StyleMenuItemClick; 191 | authorItem.Add(styleItem); 192 | end; 193 | end; 194 | 195 | procedure TNumBoxDemo.rdoAlignClick(Sender: TObject); 196 | begin 197 | NumberBox1.Alignment := TAlignment(rdoAlign.ItemIndex); 198 | end; 199 | 200 | procedure TNumBoxDemo.rdoCurrencyFormatClick(Sender: TObject); 201 | begin 202 | NumberBox1.Mode := nbmCurrency; 203 | NumberBox1.CurrencyFormat := rdoCurrencyFormat.ItemIndex; 204 | rdoMode.ItemIndex := ord(nbmCurrency); 205 | end; 206 | 207 | procedure TNumBoxDemo.rdoModeClick(Sender: TObject); 208 | begin 209 | NumberBox1.Mode := TNumberBoxMode(rdoMode.ItemIndex); 210 | end; 211 | 212 | procedure TNumBoxDemo.rdoPlacementClick(Sender: TObject); 213 | begin 214 | NumberBox1.SpinButtonOptions.Placement := TNumberBoxSpinButtonPlacement(rdoPlacement.ItemIndex); 215 | end; 216 | 217 | procedure TNumBoxDemo.StyleMenuItemClick(Sender: TObject); 218 | begin 219 | TStyleManager.TrySetStyle(TMenuItem(Sender).Caption.Replace('&','',[rfReplaceAll])); 220 | end; 221 | 222 | procedure TNumBoxDemo.unused; 223 | begin 224 | 225 | end; 226 | 227 | initialization 228 | 229 | end. 230 | -------------------------------------------------------------------------------- /10.4.2-demos/Sydney1042Demos.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {485328C8-3836-4C57-ABFD-3FB27361FEAD} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Default.Personality.12 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /10.4.2-demos/VersionInfo/VersionInfo.dpr: -------------------------------------------------------------------------------- 1 | program VersionInfo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | VersionInfo_Main in 'VersionInfo_Main.pas' {Form2}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm2, Form2); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /10.4.2-demos/VersionInfo/VersionInfo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/10.4.2-demos/VersionInfo/VersionInfo.res -------------------------------------------------------------------------------- /10.4.2-demos/VersionInfo/VersionInfo_Main.pas: -------------------------------------------------------------------------------- 1 | unit VersionInfo_Main; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | FMX.StdCtrls, FMX.Controls.Presentation, FMX.Layouts, FMX.ListBox; 9 | 10 | type 11 | TForm2 = class(TForm) 12 | ListBox1: TListBox; 13 | ListBoxGroupHeader1: TListBoxGroupHeader; 14 | lbVer: TListBoxItem; 15 | lbPlatform: TListBoxItem; 16 | lblPlatform: TLabel; 17 | ListBoxItem1: TListBoxItem; 18 | lblArchitecture: TLabel; 19 | ListBoxItem2: TListBoxItem; 20 | lblMajor: TLabel; 21 | ListBoxItem3: TListBoxItem; 22 | lblMinor: TLabel; 23 | ListBoxItem4: TListBoxItem; 24 | lblBuild: TLabel; 25 | ListBoxItem5: TListBoxItem; 26 | ListBoxItem6: TListBoxItem; 27 | lblCompiler: TLabel; 28 | ListBoxItem7: TListBoxItem; 29 | lblRTL: TLabel; 30 | ListBoxItem8: TListBoxItem; 31 | lblFMX: TLabel; 32 | Z: TListBoxItem; 33 | lblPointer: TLabel; 34 | StyleBook1: TStyleBook; 35 | procedure FormCreate(Sender: TObject); 36 | private 37 | { Private declarations } 38 | public 39 | { Public declarations } 40 | end; 41 | 42 | var 43 | Form2: TForm2; 44 | 45 | implementation 46 | 47 | {$R *.fmx} 48 | 49 | uses 50 | TypInfo, System.Rtti; 51 | 52 | procedure TForm2.FormCreate(Sender: TObject); 53 | begin 54 | lbVer.Text := TOSVersion.ToString; 55 | lblPlatform.Text := TRttiEnumerationType.GetName( TOSVersion.Platform ).Remove(0,2); 56 | lblArchitecture.Text := TRttiEnumerationType.GetName( TOSVersion.Architecture ).Remove(0,2); 57 | lblMajor.Text := TOSVersion.Major.ToString; 58 | lblMinor.Text := TOSVersion.Minor.ToString; 59 | lblBuild.Text := TOSVersion.Build.ToString; 60 | 61 | lblCompiler.Text := CompilerVersion.ToString; 62 | lblRTL.Text := Format('%f',[RTLVersion]); 63 | lblFMX.Text := FireMonkeyVersion.ToString; 64 | lblPointer.Text := (8*SizeOf(Pointer)).ToString + '-bits'; 65 | 66 | end; 67 | 68 | end. 69 | -------------------------------------------------------------------------------- /11-demos/RichEdit/overview.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss Arial;}{\f1\fscript Mistral;}{\f2\fnil\fcharset0 Ink Free;}{\f3\fnil\fcharset2 Symbol;}} 2 | {\colortbl ;\red255\green0\blue255;\red255\green0\blue0;\red0\green0\blue0;\red0\green0\blue255;} 3 | {\*\generator Riched20 10.0.19041}\viewkind4\uc1 4 | \pard\fi-300\li1380\qc\cf1\b\f0\fs32 Rich Edit Control Overview\cf2\par 5 | \cf3\fs16 (from Win32SDK Help)\par 6 | 7 | \pard\fi-300\li1380\b0\fs20\par 8 | 9 | \pard\fi-300\li1380\ri840\f1\fs30 A rich edit control is a window in which the user can enter and edit text. The text can be assigned character and paragraph formatting, and can include embedded OLE objects. Rich edit controls provide a programming interface for formatting text. However, an application must implement any user interface components necessary to make formatting operations available to the user\f0\fs20 .\par 10 | \par 11 | Rich edit \cf0\f2\fs24 controls support\cf3\f0\fs20 almost all of the messages and notification messages used with multiline edit controls. Thus, applications that already use edit controls can be easily changed to use rich edit controls. Additional messages and notifications enable applications to access the functionality unique to rich edit controls. For information about edit controls, see \i Edit Controls\i0 .\par 12 | \par 13 | An application can send messages to a rich edit control to perform such operations as formatting text, printing, and saving. An application can process notification messages to monitor events in a rich edit control. For example, an application can process notifications to filter keyboard and mouse input, to permit or deny changes to protected text, or to resize the control as needed to fit its content.\par 14 | \par 15 | \b {\pict{\*\picprop{\sp{\sn wzDescription}{\sv Image}}{\sp{\sn posv}{\sv 1}} 16 | }\pngblip\picw1931\pich1931\picwgoal1095\pichgoal1095 17 | 89504e470d0a1a0a0000000d4948445200000080000000800806000000c33e61cb000000017352 18 | 474200aece1ce90000000467414d410000b18f0bfc6105000000097048597300000ec300000ec3 19 | 01c76fa8640000112a49444154785eed9d0b901c4519c7bf9eddcba3722718450d0101d1000122 20 | c128111481b24814ee00918a54c0c8ab24567815514a79059052cbc8a3800a2531161552402965 21 | b82bca038a2404239184040204120921c0118ac041dcbbcb3d76a6ed6fa6776776761edd333db3 22 | b37bfbab4aae7bf6d5ddff7f7fd3ddf382264d9a8c6208ffdbd874f74f6a198649d4281e4073da 23 | fea0d3364ac83820246fb097354a8b84d241c89102d18d4f8996df33320676c3ec09bbad2f685c 24 | 1acb002b0b537339329d80318d827614a5740a017218001dc3df210919a640771242b6b3ef7c9d 25 | 7de7165da79be1ecb6adfc0d754f5d1ba0a5b3ff781de86984c0c940e9496cd344eb95c4e965d1 26 | 631da5b0360764d548c7844d7c7bdd517706c8afdc3b8b6a5a0713e00c26fa217c736d2164172b 27 | cb13c4303a8b67eff724df5a17d48501b0a753aacf35883687009dcc376714d243a8f12821b915 28 | f51019326d805c57df5cd6b32e65c953ac2d75c71a161d96eaedad2b783e7364d2005a67dfd584 29 | d00540e170bea9be21b0835272afd1d17a17df9219326500537880856cd49ef1302f08b62eb592 30 | 16a487651767c908993000867a3665bb9115e608be498eaa86ae3121e5612f6d6353cbdbb2b06b 31 | a8a90170706750fd76b69f9ccd378d2e28edd648eefa5a0e166b6600adabb08850b89967473594 32 | c02d467bdb229e4d95d40dd0d2b5f75b06d5ee66c999d696269cf51a31ae1a69dfef059e4f8554 33 | 0d600df2e89d3c9b4970d75dcbfd2205724d9a83c474eaba9ae67385c232f67317f22d19a5d6f2 34 | 97a0cbf5b6b68be15452e41b1223f9dae2011a8d3cc82a35836fa903b26004b25137e8bca40f3c 35 | 255acb7c57dfe96c7af7304ba67590a6d1e865d3c5f38bedad4ff1bc7234fe57397c6e8f07466a 36 | 2b7e16227a7426621b9a4be209918801b4c70b97b339ee433cab1687a0016b2d36ee37a93044da 37 | a6626d69b669022837002be802426009cf7a22249c1f8e0f47d221d68f73547c8724d8a6d8b63c 38 | ab0ca55e469786893fba40a7a80d1794c27ce3acb6fb793636ca4ac70fdd2613f6471ba84a5094 39 | 21e40255c7119418808ff63377264c60ff0b6be48cc36607b354cc0ee21bc09ce7c3732ce51aed 40 | ab0f7fa317cfb6ecd50df86edc75827883405ce1331779bca67af52d7eb68283675b4e34db9e69 41 | c0f3918865006b7937cd15bef46449dbbed16a4667581a4427723d830eec7cef733978e6c4f13c 42 | d7240aeea07febb661b875fb30cf5512e70052a408808774838eeab1a96093987836a14fbba216 43 | a809cf4a11c900fc78be2f4dfd4b28de65057c5d98267e481b00cfe4617f3c4fe62895af698012 44 | a9b6c44cae8d145206c073f8824ee32a55b7b90ba80da80d6ac4b3424819c03c8133011407ca51 45 | 8dac46c20630977a05cfde0d0e00d57237038642984632878f850d80e7edf36428c182262f7792 46 | 11a51ea2958c564206e057ec085fb451eb1e9de4efd7ba6e22a056a819cf06226400f6850b7952 47 | 88e620b0f6886a166a00cb490d72ad1ed248234e36ecf7874e168902a10630afd29524c90030a0 48 | 03bcb4d780477a8af0c73787a1f383226cebc33bfd08927a747288e49d14c0e7dd34b83222da05 49 | 1ac03ac943fe12eda4daf8be9d2370f4ea7e98b176002ed83408bf7e7d187eb461906d1b8033ff 50 | b30fdeec9730821f72ca08e0680defa400115b9469173623088e00d6cd19a421090c027ef2e220 51 | 5cf5ea10bcbbcf5ba1ee0f753872d5003cf8ee08df1211f545af2d211afa1a80af2845ba3387ea 52 | 36bcfbad11f8fbfb6217c95cf2d250c07b25bab7f248a08248853a256875d0d700784f1e9e9446 53 | a5019efd58876b5f1be2393116bc3204ef0d7a359644c93cde2adffc619f90fdc6682d1ba4a5bf 54 | 01883687276bca0d6f781f03b7f06ec08f86a9395e508d7cf3877d229aa0b20469e96900bc151b 55 | fb58e4a99fca21c02bffe3033bcfeff4ffa1ad050503c286814eb634adc6d300e67df862a04a7f 56 | 14b1afc87bb964b4dcb497cd1743910dc1b2ef4f826865f0d3d47b178037618c812a03c4696e43 57 | e8c3b2258d5f339caae2e95def7b8e5144885006fc888fa6550630478c31efc0a9ca0053261068 58 | f11da50433ed33113f9820383bc1a92a9edb87d35a7162461efc38d3d46b3650d54a78ef5d9eac 59 | 392d1a81a9add1843c22e2e79202c5778afeef5e5d220aa8e9525eda56b5121bc09dcc93915139 60 | 08fcc5612d3c1582eb37cffc62acd3e5a50992d22d3e72d3943170e038850d258097b6d5ddc4ba 61 | eb762c5456eb922fb7c0bc83054ce050e0eaafb4c0f70fc8f15c3af8d5d916df2ee00d4cfc9b8e 62 | 887807fb3878685b69809585a9ecffd83774501d7cff72dc58f8fc18315b9df5a53c2c3e7a2ccf 63 | d596ca9e6f95ff375f1b038b6a21bec544ae71990aadf0610b3c198f0422db07b326c0452c1af8 64 | b17f0b81bfcd18078f7d731cdf525b2cf1f7f19cc5755f1d03b71e5933f14ddc1a5718009fb4c1 65 | 93b148407f9307be3e16ba678e87bb8f190b971dd2023ff842ce0cf7f7b3edab4f1c0fe74c52b3 66 | df171d9af961f77cbb257ec9c4bffd284bfcb8df8f44fd0eb7c61506c0c7acf06466c17d3b0e0c 67 | 974c1b0b5d278c37c3fda52c321cab70da576160c996f61af05d7b780bfc8e8b8fa8e82051bfc3 68 | ad71a501289dc293b170164e85dbdd54563e895f7020d1d25ee26384fac3d46c8c4910b7c615d5 69 | cb75f60db1b7c4de49cd999c8715c7abd9176ff85467ff0c58fbb10ecfecd1e193117fc1677e36 70 | c7fe69d6df89393828c2346bc800d8d16fc0d436b988e225fe954cfc3b140d48832e0e95830ceb 71 | 1dade542d9b5ecee9fa4427c44bed9ab59fe5e11befddc3ef3df95af58c7f883c447d67fa2c35d 72 | 6f8d98421cfa743ffcfebf720df602fbfc77fe3500d3d6f45789198497f80bd86e4a95f86a611a 73 | 9b5a5b940d80cfd5e3c9185802c535c0e9cfef838b360f9abd3f0e782879fab303f086e0398378 74 | 56d1e6bdf85ee229aa175eef9b7f680bdcc506aad9a0bad338b52e1b001faac8933188273d1ec7 75 | cf77f5c1aa8f048417fc293c9c7cccea0158f276f8f9013f3eb07216e16902477b7abdfe73363b 76 | b9e7d8b4c50f8a8cd50de5d4da36003e515388e0308c44b5c1391bb031adefa761bf135e8c0aae 77 | 60bb913dcc6041e07eff916f94c62ed67bab44e695f3121f6723f7b1d9891a642a28d7e24eaded 78 | 31804edb782a84f01f133f16605772e93b23f07c2ff67c626e2592951261de26576ff600a38065 79 | 02fbf7dd627b897f31131fd723d4a1befe651c5adb11009fa51b175e66f1a25befdcc2c2f4c2d7 80 | ec015b52557f8acd229631a385619bc0a624ba97f83f3bb805feac54fc64716a6d470042e22fa3 81 | f10e2d2b20eef3cb67fe248cd0f882116402273f3d380f4b8fab13f15118f39fadb56d80326142 82 | 840b257b3818a76f6961ff56783dbc4ce064ee417958765cfcc0991a586557b56d0350ca4fa60f 83 | 534fb67f87b3dedcf7a7c3db0314b69b571089d5c3cf04e74fcec383d353103fdca7f294b57618 84 | c07c7ebe12286b5a7193e0aa9bf739fcc9610d36c5719b00573a972b5ae90c457d7fabd0da8e00 85 | 3952e0a998c88ddfd3161fd9c5a2802c25139cc7fe465be64ebf9ebe38b4b623806e7cca93b151 86 | 794a589640133c1c302608267ea3d86b23f1cce4d4da368096dfc393b171563543beaf7becd81a 87 | cf4c4eadcb06181903bb7952298d100c1acdc44eaded31c0ec096c235171bc514ef43a70482398 88 | d886696c6a6d515137adb3f006db10ed09de0e704d5c745914affe7d567071462535392b3706aa 89 | ce0760d16c9bd1d17624cf561a20d7d5d7c9e688ed3c1b193c5f0f4fd9ca1c18cbb3d69d05cba4 90 | ec841042baf4f6d6f27582f62e8041c0789d274309da2f66ad8dcb282c987ffd835ac603a93249 91 | 7eb7076e8d2b0c4041dbc293a104953bb30650887f1d036a5fa11f6664058ddfb26e8d2b0ca0eb 92 | 74334f6696f87d2005fc0a59a11f662a05b53f965c2ddd1a5718803f80a8d7ca4427c98520efaf 93 | 166fb0540c14b1fef6c7126bc05ef743a62a0d8010b28ea72293a0fe3eb87fd15fe6f4cbe6432a 94 | 4e74e1a16d95012885b53c5946b6acb56fe4ccc8ec4f0d8ae8a56d9501724056f16499c0b27abc 95 | d8a8c702ea1d2f6dab0c30d2316113537017cf86e3111e9afa6710a6a9a9ad8bea310042e9133c 96 | 1589a60104487b0ce0a3a9a701886174f264935804a8ecee25091bc24f53dfce9aebec7b8f952a 97 | d2bd02555e1387e01542176d1e12bec2a7891bd2a377b41ec4331578ef0218841a8ff2a4347177 98 | 01cece8017849ebb61d047fcb4e3687d12a4a5bf01482ef2f3e9e3ce024a1fffc7ee229cbb7130 99 | e06e5a71ad363a08d2d2d7007cc4b8c6cac911f8200b41f0b6efe731f1d3ba5ec0c6f97b198f30 100 | 9efeaf2af31aafd17f095f0398e4c9529e92226e04b867e78879dbf7dae02c7cd48aa4641ccf9f 101 | 719599046b186800fd87ad2bd8f7ede05961e49bcdaec96fb70fc335afbac5cf784fac22660f50 102 | 05d34e6f671a06101c011894927b7932194c6dad06bb6eeb102cdae675d243461ab4ced005b40b 103 | 3580f55c7ad2c3b342485d19c0de8a1e98bf6508feb443fd3dfe472f4c3353bb60420d80308116 104 | f3a410326380bd23d47c00d403bb9ae23bf1dde909b6ada8664206c028c0be701bcf8622aa3f3e 105 | 000ac57fb447ec7940a309df4e547686cb228ef7a35656e40e47c8000821e4369e0c25dc00d47c 106 | 18048affcf0f1d67048b3ac78fb89fcf122e7dab7155d6f17e19ad840d608e2629ede6d940c276 107 | 01eb3f31602e137f9dfb22cdd04a8710f7f371c98201994661237f27c206403492bb9e2703096a 108 | 87a7f7e8ace70f9977056938420d98bc4345352a2165005c51a2046ee1595ffc0cf0d8ee22cc7d 109 | 7110de1e301a2a5a8b936cad519ba0553f2fa40c8018ed6d8bd89ff5564e9cbfbe33628adf1b72 110 | b34727b1facbe873d87aae8d14d2064034625cc5939eb8db1e9ffc79d9cb4350b9ac1f2e6f2c0d 111 | 938fb69cd47e2890304dfc88648091f6fd5ea040aee1d92a9c83c0dbb60ffb3cf9534d17ad7df3 112 | d73ed4a016a809cf4a11c9008835cfa4cb79b6825293fc6aeb10dce2b9b42b86535c3fa13d9bbf 113 | f69aa4085d2e3ae7f722b20110bdaded62d6da1b79b60cb6ffe52f0fc31d3197769d3a5ab78f14 114 | 241b51398480420a1b986cb434884e2c03c0a9a4a81b741e4b555c4d8467ef2c7d47c9ad061c34 115 | 5ab70ea88f98817bcdb6671af07c2494b46abeabef744ae9933cdb24050821b38aedad4ff16c64 116 | e245008e5910422ee0d92649c3da5a85f888120320b8fc4829cce7d914a88b1dbd72b08d65967a 117 | c3506600c438abed7e56c02b783661ea774ce06f5d9f577855b16db18dad9c1a126945edf1c2e5 118 | 84c0129e1d65a088ea9b157bbe6af191c4ba51aeab6f2e2bf5433c9b0db0b675b3e7701889edf3 119 | 55867d27891900e1b383875932f6e368a5a92bb17de965a3fdf3550df8bc503a06708305d70df8 120 | 2efb99aac5a2c4a97bf1c9466cbb24c547128d006556d37cae5058c67eee42bea5492074b9b9c2 121 | 1773914784740cc0d13afbae2640efe4d9261ee0819d386bfbb224ba0b708315d38871024b4a9f 122 | 4f300a588f6d93a6f848aa11c089d655584428dcccb30a4866fa950678264f9493395450d3166b 123 | e9ec3fdea0faed6c9a339b6f1a5d50da8de7f0c99ec6a5924c74195c3360d3c51b596162dfa8ba 124 | 1e60b16a1b9eba9dd4dc5e864cc54c6b90080b591345ba3349f6213d4cfcc569efe783c894014a 125 | 9846207401eb2a87f34df1c05a06ad0b04beae606c4160075e649b25e14b64d20025f872f2a52c 126 | 798ab5c50f05224920f16b6bd8f866691642bd1f993640091c2c52aacfa5449bc39a3fe3bb07d2 127 | 83f7e4c1dbb2d47270274a5d18c0497ee5de5954d33a58cf3a83458743f8e6da8237d6a4f409bc 128 | 155bf1ecfdeaeacca8ba3380138c0c3ad0d3088193990027b14de91c7432a01772641da5b0166f 129 | bf5a0f3ddd8fba3640152b0b537339329d80318d8276149b5a4e21400e63bb8d880f0822c314e8 130 | 4e3665db8e4fdac0872d98f7db77dd72bd9e692c03f8d1dd3fa965182651a37800cd69fbe3f3f3 131 | cd47a8979ea24d69d17c9c6a8e14f0a18af85c3df3d16a8ea76b3569d2a449a301f07fca8e1d54 132 | dd5b9b300000000049454e44ae426082 133 | }\b0\par 134 | \par 135 | \b TRichEdit Component updated to RichEdit 4.1 (MSFTEDIT.dll)\b0\par 136 | 137 | \pard\fi-60\li1140\ri840 In this release we updated the implementation of the VCL TRichEdit component to support a more recent version of the platform control. By doing so we have made a available directly in the VCL component many new platform features, including:\par 138 | 139 | \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-300\li1380\ri860\i Transparent \i0 richedit controls: When the new property Transparent is set to True the richedit becomes transparent -- its background is replaced by whatever is beneath it. When it is set to False, it behaves as normal, with its background filled with Color.\par 140 | 141 | \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-300\li1380\ri840 URL detection, tooltips and link clicking (see below for more information)\par 142 | {\pntext\f3\'B7\tab}Spell checking: There is a new property \i SpellChecking\i0 ; when set to True the richedit automatically offers native spell checking abilities (on Windows 8 or later)\par 143 | {\pntext\f3\'B7\tab}\super Subscript\nosupersub and \sub superscript\nosupersub text attributes\par 144 | {\pntext\f3\'B7\tab}Background color\par 145 | {\pntext\f3\'B7\tab}Scroll position tracking (new property ScrollPosition: TPoint)\par 146 | {\pntext\f3\'B7\tab}Changing margins\par 147 | {\pntext\f3\'B7\tab}Other missing attributes (see below)\par 148 | {\pntext\f3\'B7\tab}\i EM_FormatRange \i0 support (see below)\par 149 | 150 | \pard\fi-300\li1380\ri840 Additionally, TDBRichEdit.Lines is now a public property\par 151 | \par 152 | \b RichEdit URL detection\par 153 | \b0 RichEdit URL detection is made available with the following new features:\par 154 | 155 | \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-300\li1380\ri840\i EnableURLs \i0 turns on automatic URL detection in the richedit control. It recognises URLs with known protocols (e.g. {\cf0{\field{\*\fldinst{HYPERLINK http://google.com }}{\fldrslt{http://google.com\ul0\cf0}}}}\f0\fs20 ) or that start with www. (e.g. {\cf0{\field{\*\fldinst{HYPERLINK www.google.com }}{\fldrslt{www.google.com\ul0\cf0}}}}\f0\fs20 ).\par 156 | {\pntext\f3\'B7\tab}\i ShowURLHint\i0 , when set to True, causes tooltips to be automatically displayed when the mouse is over a URL.\par 157 | {\pntext\f3\'B7\tab}\i SetSelTextToFriendlyURL \i0 replaces the selected text (starting at position SelStart and running for SelLength characters) with a friendly hyperlink - any text you like (Text) that is a hyperlink to a specified URL (URL)\par 158 | {\pntext\f3\'B7\tab}When a URL in the richedit is clicked with the left or right mouse button the OnLinkClick event fires, passing the URL and an indication of which button was pressed\par 159 | } 160 | -------------------------------------------------------------------------------- /11-demos/RichEdit/reabout.pas: -------------------------------------------------------------------------------- 1 | unit reabout; 2 | 3 | interface 4 | 5 | uses Windows, Classes, Graphics, Forms, Controls, StdCtrls, 6 | Buttons, ExtCtrls, SysUtils; 7 | 8 | type 9 | TAboutBox = class(TForm) 10 | OKButton: TButton; 11 | ProgramIcon: TImage; 12 | Label1: TLabel; 13 | Bevel1: TBevel; 14 | Label2: TLabel; 15 | Label3: TLabel; 16 | PhysMem: TLabel; 17 | Label4: TLabel; 18 | FreeRes: TLabel; 19 | procedure FormCreate(Sender: TObject); 20 | private 21 | { Private declarations } 22 | public 23 | { Public declarations } 24 | end; 25 | 26 | var 27 | AboutBox: TAboutBox; 28 | 29 | implementation 30 | 31 | {$R *.dfm} 32 | 33 | procedure TAboutBox.FormCreate(Sender: TObject); 34 | var 35 | MS: TMemoryStatusEx; 36 | begin 37 | MS.dwLength := SizeOf(TMemoryStatusEx); 38 | GlobalMemoryStatusEx(MS); 39 | PhysMem.Caption := FormatFloat('#,###" MB"', MS.ullTotalPhys shr 20); 40 | FreeRes.Caption := Format('%d %%', [MS.dwMemoryLoad]); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /11-demos/RichEdit/richedit.dpr: -------------------------------------------------------------------------------- 1 | program richeditdemo; 2 | 3 | uses 4 | Forms, 5 | reabout in 'reabout.pas' {AboutBox}, 6 | remain in 'remain.pas' {MainForm}, 7 | Vcl.Themes, 8 | Vcl.Styles; 9 | 10 | {$R richedit.RES} 11 | 12 | begin 13 | Application.Initialize; 14 | TStyleManager.TrySetStyle('Iceberg Classico'); 15 | Application.Title := 'Rich Edit Control Demo'; 16 | Application.CreateForm(TMainForm, MainForm); 17 | Application.Run; 18 | end. 19 | -------------------------------------------------------------------------------- /11-demos/RichEdit/richedit.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/RichEdit/richedit.res -------------------------------------------------------------------------------- /11-demos/RichEdit/richedit_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/RichEdit/richedit_Icon.ico -------------------------------------------------------------------------------- /11-demos/TTreeView/TreeCheck.dpr: -------------------------------------------------------------------------------- 1 | program TreeCheck; 2 | 3 | uses 4 | Vcl.Forms, 5 | TreeMain in 'TreeMain.pas' {Form2}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Windows10 Blue'); 15 | Application.CreateForm(TForm2, Form2); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /11-demos/TTreeView/TreeCheck.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/TreeCheck.res -------------------------------------------------------------------------------- /11-demos/TTreeView/TreeMain.pas: -------------------------------------------------------------------------------- 1 | unit TreeMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, System.ImageList, Vcl.ImgList, 8 | FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, 9 | FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, 10 | FireDAC.Stan.StorageBin, Data.DB, FireDAC.Comp.DataSet, 11 | FireDAC.Comp.Client, Vcl.Buttons, Vcl.BaseImageCollection, 12 | Vcl.ImageCollection, Vcl.VirtualImageList, Vcl.ExtCtrls; 13 | 14 | type 15 | TForm2 = class(TForm) 16 | TreeView1: TTreeView; 17 | Button1: TButton; 18 | Button3: TButton; 19 | Button4: TButton; 20 | Button5: TButton; 21 | Button2: TButton; 22 | lstLog: TListBox; 23 | Button6: TButton; 24 | Button7: TButton; 25 | Button8: TButton; 26 | Button9: TButton; 27 | Button10: TButton; 28 | Button11: TButton; 29 | Button12: TButton; 30 | FDMemTable1: TFDMemTable; 31 | FDMemTable1word: TStringField; 32 | Label1: TLabel; 33 | Button13: TButton; 34 | Button14: TButton; 35 | SpeedButton1: TSpeedButton; 36 | Button15: TButton; 37 | Panel1: TPanel; 38 | procedure Button1Click(Sender: TObject); 39 | procedure Button2Click(Sender: TObject); 40 | procedure Button3Click(Sender: TObject); 41 | procedure Button4Click(Sender: TObject); 42 | procedure Button5Click(Sender: TObject); 43 | procedure Button6Click(Sender: TObject); 44 | procedure Button7Click(Sender: TObject); 45 | procedure Button8Click(Sender: TObject); 46 | procedure Button9Click(Sender: TObject); 47 | procedure Button10Click(Sender: TObject); 48 | procedure Button11Click(Sender: TObject); 49 | procedure Button12Click(Sender: TObject); 50 | procedure TreeViewCheckStateChanging(Sender: TCustomTreeView; Node: TTreeNode; 51 | NewCheckState, OldCheckState: TNodeCheckState; var AllowChange: Boolean); 52 | procedure TreeViewCheckStateChanged(Sender: TCustomTreeView; Node: TTreeNode; 53 | CheckState: TNodeCheckState); 54 | procedure Button13Click(Sender: TObject); 55 | procedure Button14Click(Sender: TObject); 56 | procedure SpeedButton1Click(Sender: TObject); 57 | procedure FormShow(Sender: TObject); 58 | procedure Button15Click(Sender: TObject); 59 | procedure FormCreate(Sender: TObject); 60 | private 61 | { Private declarations } 62 | procedure Log(const Msg: string); overload; 63 | procedure Log(const Msg: string; const Args: array of const); overload; 64 | procedure AllowAllStyles; 65 | public 66 | { Public declarations } 67 | end; 68 | 69 | var 70 | Form2: TForm2; 71 | 72 | implementation 73 | 74 | {$R *.dfm} 75 | 76 | procedure TForm2.Log(const Msg: string); 77 | begin 78 | lstLog.ItemIndex := lstLog.Items.Add(Msg) 79 | end; 80 | 81 | procedure TForm2.Log(const Msg: string; const Args: array of const); 82 | begin 83 | Log(Format(Msg, Args)) 84 | end; 85 | 86 | procedure TForm2.SpeedButton1Click(Sender: TObject); 87 | begin 88 | lstLog.Clear; 89 | end; 90 | 91 | procedure TForm2.FormCreate(Sender: TObject); 92 | begin 93 | TreeView1.Items.Clear; 94 | lstLog.Clear; 95 | end; 96 | 97 | procedure TForm2.FormShow(Sender: TObject); 98 | begin 99 | FDmemTable1.Open; 100 | 101 | while fdMemTable1.RecordCount > 0 do 102 | begin 103 | FDMemTable1.RecNo := random(fdMemTable1.RecordCount); 104 | var randomWord := FDMemTable1.Fields[0].AsString; 105 | var randomNode: TTreeNode := nil; 106 | if TreeView1.Items.Count > 0 then 107 | randomNode := TreeView1.Items.Item[random(TreeView1.Items.Count)]; 108 | case random(4) of 109 | 0 : TreeView1.Items.AddChild(nil, randomWord); 110 | 1..2 : TreeView1.Items.AddChild(randomNode, randomWord); 111 | 3 : TreeView1.Items.Add(randomNode, randomWord); 112 | end; 113 | FDMemTable1.Delete; 114 | end; 115 | 116 | end; 117 | 118 | function CheckStateToStr(CheckState: TNodeCheckState): string; 119 | begin 120 | case CheckState of 121 | ncsNone: Result := 'N/A'; 122 | ncsUnchecked: Result := 'unchecked'; 123 | ncsChecked : Result := 'checked'; 124 | ncsPartial : Result := 'partial'; 125 | ncsDimmed : Result := 'dimmed'; 126 | ncsExclusion: Result := 'exclusion'; 127 | end; 128 | end; 129 | 130 | procedure TForm2.TreeViewCheckStateChanged(Sender: TCustomTreeView; Node: TTreeNode; CheckState: TNodeCheckState); 131 | begin 132 | Log('Node ''%s'' state changed to %s', [Node.Text, CheckStateToStr(CheckState)]); 133 | end; 134 | 135 | procedure TForm2.TreeViewCheckStateChanging(Sender: TCustomTreeView; Node: TTreeNode; NewCheckState, 136 | OldCheckState: TNodeCheckState; var AllowChange: Boolean); 137 | begin 138 | Log('Node ''%s'' state changing: %s -> %s', 139 | [Node.Text, CheckStateToStr(OldCheckState), CheckStateToStr(NewCheckState)]); 140 | end; 141 | 142 | procedure TForm2.Button1Click(Sender: TObject); 143 | begin 144 | TreeView1.CheckBoxes := not TreeView1.CheckBoxes; 145 | if TreeView1.CheckBoxes then 146 | Log('CheckBoxes = True') 147 | else 148 | Log('CheckBoxes = False') 149 | end; 150 | 151 | procedure TForm2.Button2Click(Sender: TObject); 152 | begin 153 | TreeView1.CheckStyles := []; 154 | Log('CheckStyles = []') 155 | end; 156 | 157 | procedure TForm2.Button3Click(Sender: TObject); 158 | begin 159 | TreeView1.CheckStyles := [csPartial]; 160 | Log('CheckStyles = [csPartial]') 161 | end; 162 | 163 | procedure TForm2.Button4Click(Sender: TObject); 164 | begin 165 | TreeView1.CheckStyles := [csPartial, csDimmed]; 166 | Log('CheckStyles = [csPartial, csDimmed]') 167 | end; 168 | 169 | procedure TForm2.Button5Click(Sender: TObject); 170 | begin 171 | TreeView1.CheckStyles := [csPartial, csExclusion]; 172 | Log('CheckStyles = [csPartial, csExclusion]') 173 | end; 174 | 175 | procedure TForm2.Button6Click(Sender: TObject); 176 | begin 177 | TreeView1.CheckStyles := [csDimmed, csExclusion]; 178 | Log('CheckStyles = [csDimmed, csExclusion]') 179 | end; 180 | 181 | procedure TForm2.AllowAllStyles; 182 | begin 183 | TreeView1.CheckStyles := [csPartial, csDimmed, csExclusion]; 184 | Log('CheckStyles = [csPartial, csDimmed, csExclusion]'); 185 | end; 186 | 187 | procedure TForm2.Button7Click(Sender: TObject); 188 | begin 189 | AllowAllStyles; 190 | end; 191 | 192 | procedure TForm2.Button8Click(Sender: TObject); 193 | begin 194 | TreeView1.Items[0].CheckState := ncsUnchecked 195 | end; 196 | 197 | procedure TForm2.Button9Click(Sender: TObject); 198 | begin 199 | TreeView1.Items[0].CheckState := ncsChecked 200 | end; 201 | 202 | procedure TForm2.Button10Click(Sender: TObject); 203 | begin 204 | TreeView1.Items[0].CheckState := ncsPartial 205 | end; 206 | 207 | procedure TForm2.Button11Click(Sender: TObject); 208 | begin 209 | TreeView1.Items[0].CheckState := ncsDimmed 210 | end; 211 | 212 | procedure TForm2.Button12Click(Sender: TObject); 213 | begin 214 | TreeView1.Items[0].CheckState := ncsExclusion 215 | end; 216 | 217 | procedure TForm2.Button13Click(Sender: TObject); 218 | begin 219 | TreeView1.LockDrawing; 220 | try 221 | TreeView1.FullExpand; 222 | TreeView1.Items.GetFirstNode.MakeVisible; 223 | finally 224 | TreeView1.UnlockDrawing; 225 | end; 226 | end; 227 | 228 | procedure TForm2.Button14Click(Sender: TObject); 229 | begin 230 | TreeView1.LockDrawing; 231 | try 232 | TreeView1.FullCollapse; 233 | TreeView1.Items.GetFirstNode.MakeVisible; 234 | finally 235 | TreeView1.UnlockDrawing; 236 | end; 237 | end; 238 | 239 | procedure TForm2.Button15Click(Sender: TObject); 240 | begin 241 | AllowAllStyles; 242 | TreeView1.LockDrawing; 243 | lstLog.LockDrawing; 244 | try 245 | for var i := 0 to pred(TreeView1.Items.Count) do 246 | begin 247 | var state := Succ(TNodeCheckState(random(5))); 248 | TreeView1.Items[i].CheckState := state; 249 | end; 250 | finally 251 | TreeView1.UnlockDrawing; 252 | lstLog.UnlockDrawing; 253 | end; 254 | end; 255 | 256 | end. 257 | -------------------------------------------------------------------------------- /11-demos/TTreeView/black border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/black border.png -------------------------------------------------------------------------------- /11-demos/TTreeView/black box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/black box.png -------------------------------------------------------------------------------- /11-demos/TTreeView/blue dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/blue dot.png -------------------------------------------------------------------------------- /11-demos/TTreeView/green heavy chec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/green heavy chec.png -------------------------------------------------------------------------------- /11-demos/TTreeView/green light check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/green light check.png -------------------------------------------------------------------------------- /11-demos/TTreeView/red x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/red x.png -------------------------------------------------------------------------------- /11-demos/TTreeView/words.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TTreeView/words.db -------------------------------------------------------------------------------- /11-demos/TZipFile/RADZipper_Delphi.dpr: -------------------------------------------------------------------------------- 1 | program RADZipper_Delphi; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | ZipMain in 'ZipMain.pas' {Form20}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm20, Form20); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /11-demos/TZipFile/RADZipper_Delphi.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/TZipFile/RADZipper_Delphi.res -------------------------------------------------------------------------------- /11-demos/TZipFile/ZipMain.fmx: -------------------------------------------------------------------------------- 1 | object Form20: TForm20 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form20' 5 | ClientHeight = 398 6 | ClientWidth = 400 7 | Padding.Left = 10.000000000000000000 8 | Padding.Top = 10.000000000000000000 9 | Padding.Right = 10.000000000000000000 10 | Padding.Bottom = 10.000000000000000000 11 | FormFactor.Width = 320 12 | FormFactor.Height = 480 13 | FormFactor.Devices = [Desktop] 14 | OnCreate = FormCreate 15 | OnClose = FormClose 16 | DesignerMasterStyle = 0 17 | object lstFiles1: TListBox 18 | Align = Top 19 | Margins.Top = 10.000000000000000000 20 | Position.X = 10.000000000000000000 21 | Position.Y = 100.000000000000000000 22 | Size.Width = 380.000000000000000000 23 | Size.Height = 173.000000000000000000 24 | Size.PlatformDefault = False 25 | TabOrder = 1 26 | DisableFocusEffect = True 27 | DefaultItemStyles.ItemStyle = '' 28 | DefaultItemStyles.GroupHeaderStyle = '' 29 | DefaultItemStyles.GroupFooterStyle = '' 30 | Viewport.Width = 376.000000000000000000 31 | Viewport.Height = 169.000000000000000000 32 | end 33 | object edtPath: TEdit 34 | Touch.InteractiveGestures = [LongTap, DoubleTap] 35 | Align = Top 36 | TabOrder = 2 37 | Text = '..\..\' 38 | Position.X = 10.000000000000000000 39 | Position.Y = 36.000000000000000000 40 | Margins.Top = 10.000000000000000000 41 | Size.Width = 380.000000000000000000 42 | Size.Height = 22.000000000000000000 43 | Size.PlatformDefault = False 44 | end 45 | object Label1: TLabel 46 | Align = Top 47 | AutoSize = True 48 | Position.X = 10.000000000000000000 49 | Position.Y = 10.000000000000000000 50 | Size.Width = 380.000000000000000000 51 | Size.Height = 16.000000000000000000 52 | Size.PlatformDefault = False 53 | Text = 'Path' 54 | TabOrder = 3 55 | end 56 | object Button1: TButton 57 | Align = Top 58 | Margins.Top = 10.000000000000000000 59 | Position.X = 10.000000000000000000 60 | Position.Y = 68.000000000000000000 61 | Size.Width = 380.000000000000000000 62 | Size.Height = 22.000000000000000000 63 | Size.PlatformDefault = False 64 | TabOrder = 4 65 | Text = 'Get Files' 66 | OnClick = Button1Click 67 | end 68 | object lblCompressed: TLabel 69 | Align = Top 70 | Margins.Top = 10.000000000000000000 71 | Position.X = 10.000000000000000000 72 | Position.Y = 300.000000000000000000 73 | Size.Width = 380.000000000000000000 74 | Size.Height = 17.000000000000000000 75 | Size.PlatformDefault = False 76 | TextSettings.HorzAlign = Center 77 | Text = '-' 78 | TabOrder = 6 79 | end 80 | object lblSize: TLabel 81 | Align = Top 82 | Position.X = 10.000000000000000000 83 | Position.Y = 273.000000000000000000 84 | Size.Width = 380.000000000000000000 85 | Size.Height = 17.000000000000000000 86 | Size.PlatformDefault = False 87 | TextSettings.HorzAlign = Center 88 | Text = '-' 89 | TabOrder = 7 90 | end 91 | object lblTempFile: TLabel 92 | Align = Top 93 | Margins.Top = 10.000000000000000000 94 | Position.X = 10.000000000000000000 95 | Position.Y = 327.000000000000000000 96 | Size.Width = 380.000000000000000000 97 | Size.Height = 17.000000000000000000 98 | Size.PlatformDefault = False 99 | TextSettings.HorzAlign = Center 100 | Text = '-' 101 | TabOrder = 5 102 | end 103 | end 104 | -------------------------------------------------------------------------------- /11-demos/TZipFile/ZipMain.pas: -------------------------------------------------------------------------------- 1 | unit ZipMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, 8 | FMX.Controls.Presentation, FMX.Edit, FMX.Layouts, FMX.ListBox; 9 | 10 | type 11 | TForm20 = class(TForm) 12 | lstFiles1: TListBox; 13 | edtPath: TEdit; 14 | Label1: TLabel; 15 | Button1: TButton; 16 | lblCompressed: TLabel; 17 | lblSize: TLabel; 18 | lblTempFile: TLabel; 19 | procedure Button1Click(Sender: TObject); 20 | procedure FormCreate(Sender: TObject); 21 | procedure FormClose(Sender: TObject; var Action: TCloseAction); 22 | private 23 | { Private declarations } 24 | var ZipFileName: String; 25 | public 26 | { Public declarations } 27 | end; 28 | 29 | var 30 | Form20: TForm20; 31 | 32 | implementation 33 | 34 | {$R *.fmx} 35 | 36 | uses IOUtils, System.Zip; 37 | 38 | procedure TForm20.Button1Click(Sender: TObject); 39 | begin 40 | lstFiles1.Clear; 41 | var files := TDirectory.GetFiles(edtPath.Text, '*.*', TSearchOption.soAllDirectories); 42 | var size: Integer := 0; 43 | if TFile.Exists(ZipFileName) then 44 | TFile.Delete(ZipFileName); 45 | lstFiles1.BeginUpdate; 46 | try 47 | for var i := 0 to pred(length(files)) do 48 | begin 49 | size := size + TFile.GetSize(files[i]); 50 | lstFiles1.Items.Add(TPath.GetFileName(files[i])); 51 | end; 52 | finally 53 | lstFiles1.EndUpdate; 54 | end; 55 | lblSize.Text := Format('%d bytes uncompressed', [size]); 56 | // Zips sub directories too 57 | TZipFile.ZipDirectoryContents( ZipFileName, edtPath.Text ); 58 | 59 | lblTempFile.Text := ZipFileName; 60 | 61 | var ZipSize := TFile.GetSize(ZipFileName); 62 | var ZipValid: String; 63 | // New in 11.0 TZipFile.IsValid 64 | if TZipFile.IsValid(ZipFileName) then 65 | ZipValid := 'Valid' 66 | else 67 | ZipValid := 'Invalid'; 68 | lblCompressed.Text := Format('%d bytes (%s) %f%%', [ZipSize, ZipValid, ZipSize/Size*100]); 69 | end; 70 | 71 | procedure TForm20.FormClose(Sender: TObject; var Action: TCloseAction); 72 | begin 73 | if TFile.Exists(ZipFileName) then 74 | TFile.Delete(ZipFileName); 75 | end; 76 | 77 | procedure TForm20.FormCreate(Sender: TObject); 78 | begin 79 | ZipFileName := TPath.Combine(TPath.GetTempPath, 'TestZip.zip'); 80 | end; 81 | 82 | end. 83 | -------------------------------------------------------------------------------- /11-demos/Win11Corners/Win11Corners.dpr: -------------------------------------------------------------------------------- 1 | program Win11Corners; 2 | 3 | uses 4 | Vcl.Forms, 5 | Win11CornersMain in 'Win11CornersMain.pas' {Win11CornersForm}, 6 | Vcl.Themes, 7 | Vcl.Styles; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | TStyleManager.TrySetStyle('Windows10 Blue'); 15 | Application.CreateForm(TWin11CornersForm, Win11CornersForm); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /11-demos/Win11Corners/Win11Corners.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/Win11Corners/Win11Corners.res -------------------------------------------------------------------------------- /11-demos/Win11Corners/Win11CornersMain.dfm: -------------------------------------------------------------------------------- 1 | object Win11CornersForm: TWin11CornersForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Windows 11 Rounding Demo' 5 | ClientHeight = 608 6 | ClientWidth = 695 7 | Color = clBtnFace 8 | CustomTitleBar.CaptionAlignment = taCenter 9 | CustomTitleBar.Control = TitleBarPanel1 10 | CustomTitleBar.Enabled = True 11 | CustomTitleBar.Height = 31 12 | CustomTitleBar.SystemColors = False 13 | CustomTitleBar.SystemButtons = False 14 | CustomTitleBar.BackgroundColor = clSkyBlue 15 | CustomTitleBar.ForegroundColor = 65793 16 | CustomTitleBar.InactiveBackgroundColor = clWhite 17 | CustomTitleBar.InactiveForegroundColor = 10066329 18 | CustomTitleBar.ButtonForegroundColor = 65793 19 | CustomTitleBar.ButtonBackgroundColor = clSkyBlue 20 | CustomTitleBar.ButtonHoverForegroundColor = 65793 21 | CustomTitleBar.ButtonHoverBackgroundColor = clTeal 22 | CustomTitleBar.ButtonPressedForegroundColor = 65793 23 | CustomTitleBar.ButtonPressedBackgroundColor = clAqua 24 | CustomTitleBar.ButtonInactiveForegroundColor = 10066329 25 | CustomTitleBar.ButtonInactiveBackgroundColor = clWhite 26 | Font.Charset = DEFAULT_CHARSET 27 | Font.Color = clWindowText 28 | Font.Height = -18 29 | Font.Name = 'Segoe UI' 30 | Font.Style = [] 31 | GlassFrame.Enabled = True 32 | GlassFrame.Top = 31 33 | StyleElements = [seFont, seClient] 34 | PixelsPerInch = 144 35 | DesignSize = ( 36 | 695 37 | 608) 38 | TextHeight = 25 39 | object TitleBarPanel1: TTitleBarPanel 40 | Left = 0 41 | Top = 0 42 | Width = 695 43 | Height = 30 44 | Margins.Left = 5 45 | Margins.Top = 5 46 | Margins.Right = 5 47 | Margins.Bottom = 5 48 | CustomButtons = <> 49 | end 50 | object Panel1: TPanel 51 | Left = 194 52 | Top = 141 53 | Width = 414 54 | Height = 420 55 | Margins.Left = 5 56 | Margins.Top = 5 57 | Margins.Right = 5 58 | Margins.Bottom = 5 59 | Anchors = [akBottom] 60 | BevelOuter = bvNone 61 | Caption = ' ' 62 | TabOrder = 1 63 | object Button1: TButton 64 | Left = 18 65 | Top = 72 66 | Width = 194 67 | Height = 38 68 | Margins.Left = 5 69 | Margins.Top = 5 70 | Margins.Right = 5 71 | Margins.Bottom = 5 72 | Caption = 'No Rounding' 73 | TabOrder = 0 74 | OnClick = Button1Click 75 | end 76 | object Button2: TButton 77 | Tag = 1 78 | Left = 18 79 | Top = 120 80 | Width = 194 81 | Height = 38 82 | Margins.Left = 5 83 | Margins.Top = 5 84 | Margins.Right = 5 85 | Margins.Bottom = 5 86 | Caption = 'Regular Round' 87 | TabOrder = 1 88 | OnClick = Button1Click 89 | end 90 | object Button3: TButton 91 | Tag = 2 92 | Left = 18 93 | Top = 168 94 | Width = 194 95 | Height = 38 96 | Margins.Left = 5 97 | Margins.Top = 5 98 | Margins.Right = 5 99 | Margins.Bottom = 5 100 | Caption = 'Small Rounding' 101 | TabOrder = 2 102 | OnClick = Button1Click 103 | end 104 | object CheckBox1: TCheckBox 105 | Left = 36 106 | Top = 36 107 | Width = 170 108 | Height = 26 109 | Margins.Left = 5 110 | Margins.Top = 5 111 | Margins.Right = 5 112 | Margins.Bottom = 5 113 | Caption = 'Custom Title Bar' 114 | Checked = True 115 | State = cbChecked 116 | TabOrder = 3 117 | OnClick = CheckBox1Click 118 | end 119 | end 120 | end 121 | -------------------------------------------------------------------------------- /11-demos/Win11Corners/Win11CornersMain.pas: -------------------------------------------------------------------------------- 1 | unit Win11CornersMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.TitleBarCtrls, 8 | Vcl.ExtCtrls; 9 | 10 | type 11 | TWin11CornersForm = class(TForm) 12 | Button1: TButton; 13 | Button2: TButton; 14 | Button3: TButton; 15 | TitleBarPanel1: TTitleBarPanel; 16 | CheckBox1: TCheckBox; 17 | Panel1: TPanel; 18 | procedure Button1Click(Sender: TObject); 19 | procedure CheckBox1Click(Sender: TObject); 20 | private 21 | { Private declarations } 22 | public 23 | { Public declarations } 24 | end; 25 | 26 | var 27 | Win11CornersForm: TWin11CornersForm; 28 | 29 | implementation 30 | 31 | {$R *.dfm} 32 | 33 | uses 34 | Winapi.Dwmapi; 35 | 36 | const 37 | // More information: 38 | // https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners 39 | // https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute 40 | // https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute 41 | // Let the system decide whether or not to round window corners 42 | DWMWCP_DEFAULT = 0; 43 | // Never round window corners 44 | DWMWCP_DONOTROUND = 1; 45 | // Round the corners if appropriate 46 | DWMWCP_ROUND = 2; 47 | // Round the corners if appropriate, with a small radius 48 | DWMWCP_ROUNDSMALL = 3; 49 | // [set] WINDOW_CORNER_PREFERENCE, Controls the policy that rounds top-level window corners 50 | DWMWA_WINDOW_CORNER_PREFERENCE = 33; 51 | 52 | 53 | procedure TWin11CornersForm.Button1Click(Sender: TObject); 54 | begin 55 | var DWM_WINDOW_CORNER_PREFERENCE: Cardinal; 56 | case TComponent(Sender).Tag of 57 | 0: DWM_WINDOW_CORNER_PREFERENCE := DWMWCP_DONOTROUND; 58 | 1: DWM_WINDOW_CORNER_PREFERENCE := DWMWCP_ROUND; 59 | 2: DWM_WINDOW_CORNER_PREFERENCE := DWMWCP_ROUNDSMALL; 60 | end; 61 | Winapi.Dwmapi.DwmSetWindowAttribute(self.Handle, DWMWA_WINDOW_CORNER_PREFERENCE, @DWM_WINDOW_CORNER_PREFERENCE, sizeof(DWM_WINDOW_CORNER_PREFERENCE)); 62 | end; 63 | 64 | procedure TWin11CornersForm.CheckBox1Click(Sender: TObject); 65 | begin 66 | Self.CustomTitleBar.Enabled := CheckBox1.Checked; 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /11-demos/Win11Corners/readme.md: -------------------------------------------------------------------------------- 1 | ## Win11Corners 2 | 3 | This shows that a Delphi 11 VCL application automatically gets rounded corners, even when using a custom titlebar. (Note: This also works with C++Builder 11 and FireMonkey, but FMX doesn't have the custom title bar). 4 | 5 | It further demonstrates how to turn rounded corners on and off if desired. 6 | -------------------------------------------------------------------------------- /11-demos/Wsl2/HelloWsl2.dpr: -------------------------------------------------------------------------------- 1 | program HelloWsl2; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils; 9 | 10 | begin 11 | try 12 | Randomize; 13 | var i := Random(1000); 14 | Writeln(Format('The random number is %d',[i])); 15 | Writeln(Format('And the magic number is %d',[i])); 16 | except 17 | on E: Exception do 18 | Writeln(E.ClassName, ': ', E.Message); 19 | end; 20 | end. 21 | -------------------------------------------------------------------------------- /11-demos/Wsl2/HelloWsl2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/Wsl2/HelloWsl2.res -------------------------------------------------------------------------------- /11-demos/Wsl2/Wsl2Demos.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {194A627D-FA34-4CCE-BFDA-0858450DDC50} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /11-demos/Wsl2/Wsl2Gui.dpr: -------------------------------------------------------------------------------- 1 | program Wsl2Gui; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Wsl2GuiMain in 'Wsl2GuiMain.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /11-demos/Wsl2/Wsl2Gui.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Embarcadero/RADStudio-DemoKit/51bfac5bb5a87edbba19738b412a94de91bbc52b/11-demos/Wsl2/Wsl2Gui.res -------------------------------------------------------------------------------- /11-demos/Wsl2/Wsl2GuiMain.pas: -------------------------------------------------------------------------------- 1 | unit Wsl2GuiMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | FMX.Controls.Presentation, FMX.StdCtrls; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | Label1: TLabel; 13 | StyleBook1: TStyleBook; 14 | procedure FormCreate(Sender: TObject); 15 | private 16 | { Private declarations } 17 | public 18 | { Public declarations } 19 | end; 20 | 21 | var 22 | Form1: TForm1; 23 | 24 | implementation 25 | 26 | {$R *.fmx} 27 | 28 | procedure TForm1.FormCreate(Sender: TObject); 29 | begin 30 | Label1.Text := TOSVersion.ToString; 31 | end; 32 | 33 | end. 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RAD Studio 10.4 Sydney and 11 Alexandria DemoKit 2 | These are suplemental demos and samples specifically for demonstrating Embarcadero RAD Studio 10.4 & 10.4.2 Sydney. We are adding 11 Alexandria content to it. 3 | 4 | * Be sure you also have the latest [shipping demos](https://github.com/Embarcadero/RADStudio10.4Demos) 5 | * 10.4 Sydney [What's New](http://docwiki.embarcadero.com/RADStudio/Sydney/en/What%27s_New) - [Fixes](http://docwiki.embarcadero.com/RADStudio/Sydney/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_10.4) 6 | * 10.4.1 Sydney [What's New](http://docwiki.embarcadero.com/RADStudio/Sydney/en/10.4_Sydney_-_Release_1) - [Fixes](http://docwiki.embarcadero.com/RADStudio/Sydney/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_10.4.1) 7 | * 10.4.2 Sydney [What's New](http://docwiki.embarcadero.com/RADStudio/Sydney/en/10.4_Sydney_-_Release_2) - [Fixes](http://docwiki.embarcadero.com/RADStudio/Sydney/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_10.4.2) 8 | * [Release Notes](http://docwiki.embarcadero.com/RADStudio/Sydney/en/Release_Notes) 9 | * [Installation Notes](http://docwiki.embarcadero.com/RADStudio/Sydney/en/Installation_Notes) 10 | 11 | More information on the latest versions 12 | * Delphi 13 | * C++Builder 14 | * RAD Studio 15 | * [RAD Server](https://www.embarcadero.com/products/rad-server) 16 | 17 | Online Documentation 18 | * Delphi, C++Builder, and RAD Studio Topics 19 | * Delphi, C++Builder, and RAD Studio Libraries References 20 | * Delphi, C++Builder, and RAD Studio Code Examples 21 | * Supported Platform Status 22 | --------------------------------------------------------------------------------